Mercurial > hg
changeset 19333:0cfb62e043e8
parents: change parents command to use filectx
Changes the parents command to use filectx to look up the change node
instead of doing it manually. This allows extensions to modify the
file-to-commit relationship behind the filectx api.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 18 Jun 2013 13:05:16 -0700 |
parents | 84dc9669bd71 |
children | 95a49112e7ab |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Jun 24 14:02:01 2013 -0400 +++ b/mercurial/commands.py Tue Jun 18 13:05:16 2013 -0700 @@ -4356,8 +4356,10 @@ pass if not filenodes: raise util.Abort(_("'%s' not found in manifest!") % file_) - fl = repo.file(file_) - p = [repo.lookup(fl.linkrev(fl.rev(fn))) for fn in filenodes] + p = [] + for fn in filenodes: + fctx = repo.filectx(file_, fileid=fn) + p.append(fctx.node()) else: p = [cp.node() for cp in ctx.parents()]