Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable revgraph: use new walkchangerevs() API

No longer takes a cache func, returns contexts directly. This function can
be simplified a bit further, but I'll leave that for 0.10. This is _not_
backwards compatible with 1.3. Sorry.

Fixes #663

Changeset 43ae04af99d4

Parent cc7d19412b43

by Steve Borho

Changes to one file · Browse files at 43ae04af99d4 Showing diff from parent cc7d19412b43 Diff from another changeset...

 
54
55
56
57
 
58
59
60
 
511
512
513
514
515
516
 
 
 
517
518
519
 
521
522
523
524
525
526
527
528
 
533
534
535
536
537
538
539
 
 
540
541
542
 
54
55
56
 
57
58
59
60
 
511
512
513
 
 
 
514
515
516
517
518
519
 
521
522
523
 
 
524
525
526
 
531
532
533
 
 
 
 
534
535
536
537
538
@@ -54,7 +54,7 @@
 import re    from mercurial.node import nullrev -from mercurial import cmdutil, util +from mercurial import cmdutil, util, match    from tortoisehg.util import hglib   @@ -511,9 +511,9 @@
  df = util.matchdate(opts['date'])     stack = [] - get = util.cachefunc(lambda r: repo[r]) - changeiter, matchfn = cmdutil.walkchangerevs(repo.ui, repo, pats, get, opts) - for st, rev, fns in changeiter: + m = match.match(repo.root, repo.root, pats) + for st, ctx, fns in cmdutil.walkchangerevs(repo.ui, repo, m, opts): + rev = ctx.rev()   if st == 'iter':   if stack:   yield stack.pop() @@ -521,8 +521,6 @@
  if st != 'add':   continue   - ctx = get(rev) -   if only_branch:   if ctx.branch() != only_branch:   continue @@ -533,10 +531,8 @@
  if opts['only_merges'] and len(parents) != 2:   continue   - if df: - changes = get(rev) - if not df(changes[2][0]): - continue + if df and not df(ctx.date()[0]): + continue     # TODO: add copies/renames later   if opts['keyword']: