[PATCH] cmdutil: update finddate()
Steve Borho
steve at borho.org
Thu Oct 29 03:48:10 UTC 2009
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1256788066 18000
# Node ID cdc56cadb2413a9f9f0f015f137c4e9d2a625cee
# Parent 96c803e9018f93493afd90f695178b9495703970
cmdutil: update finddate()
walkchangerevs() now returns contexts, does not take a cache func.
diff -r 96c803e9018f -r cdc56cadb241 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Wed Oct 28 13:17:03 2009 -0500
+++ 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':
More information about the Mercurial-devel
mailing list