equal
deleted
inserted
replaced
1021 return t |
1021 return t |
1022 |
1022 |
1023 def finddate(ui, repo, date): |
1023 def finddate(ui, repo, date): |
1024 """Find the tipmost changeset that matches the given date spec""" |
1024 """Find the tipmost changeset that matches the given date spec""" |
1025 df = util.matchdate(date) |
1025 df = util.matchdate(date) |
1026 get = util.cachefunc(lambda r: repo[r]) |
|
1027 m = matchall(repo) |
1026 m = matchall(repo) |
1028 results = {} |
1027 results = {} |
1029 for st, rev, fns in walkchangerevs(ui, repo, m, get, {'rev':None}): |
1028 for st, ctx, fns in walkchangerevs(ui, repo, m, {'rev': None}): |
|
1029 rev = ctx.rev() |
1030 if st == 'add': |
1030 if st == 'add': |
1031 d = get(rev).date() |
1031 d = ctx.date() |
1032 if df(d[0]): |
1032 if df(d[0]): |
1033 results[rev] = d |
1033 results[rev] = d |
1034 elif st == 'iter': |
1034 elif st == 'iter': |
1035 if rev in results: |
1035 if rev in results: |
1036 ui.status(_("Found revision %s from %s\n") % |
1036 ui.status(_("Found revision %s from %s\n") % |