Mercurial > hg-stable
diff mercurial/cmdutil.py @ 6747:f6c00b17387c
use repo[changeid] to get a changectx
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:46 -0500 |
parents | c9fbd6ec3489 |
children | fb42030d79d6 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Jun 26 13:58:24 2008 -0500 +++ b/mercurial/cmdutil.py Thu Jun 26 14:35:46 2008 -0500 @@ -245,7 +245,7 @@ '''find renamed files -- yields (before, after, score) tuples''' if added is None or removed is None: added, removed = repo.status()[1:3] - ctx = repo.changectx('.') + ctx = repo['.'] for a in added: aa = repo.wread(a) bestname, bestscore = None, threshold @@ -930,7 +930,7 @@ 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.changectx(r).changeset()) + get = util.cachefunc(lambda r: repo[r].changeset()) changeiter, matchfn = walkchangerevs(ui, repo, [], get, {'rev':None}) results = {} for st, rev, fns in changeiter: @@ -992,7 +992,7 @@ return [], m if follow: - defrange = '%s:0' % repo.changectx('.').rev() + defrange = '%s:0' % repo['.'].rev() else: defrange = '-1:0' revs = revrange(repo, opts['rev'] or [defrange])