cmdutil: update finddate()
authorSteve Borho <steve@borho.org>
Wed, 28 Oct 2009 22:47:46 -0500
changeset 9666 71e081b88f3e
parent 9661 c4f6c02e33c4
child 9667 8743f2e1bc54
cmdutil: update finddate() walkchangerevs() now returns contexts, does not take a cache func.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Wed Oct 28 23:59:18 2009 +0900
+++ b/mercurial/cmdutil.py	Wed Oct 28 22:47:46 2009 -0500
@@ -1023,12 +1023,12 @@
 def finddate(ui, repo, date):
     """Find the tipmost changeset that matches the given date spec"""
     df = util.matchdate(date)
-    get = util.cachefunc(lambda r: repo[r])
     m = matchall(repo)
     results = {}
-    for st, rev, fns in walkchangerevs(ui, repo, m, get, {'rev':None}):
+    for st, ctx, fns in walkchangerevs(ui, repo, m, {'rev': None}):
+        rev = ctx.rev()
         if st == 'add':
-            d = get(rev).date()
+            d = ctx.date()
             if df(d[0]):
                 results[rev] = d
         elif st == 'iter':