Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 36402:ef6ae3f64c23
cmdutil: use ctx.rev() instead of int(ctx)
Continuing to wean off basectx.__int__.
Differential Revision: https://phab.mercurial-scm.org/D2424
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 24 Feb 2018 10:51:13 -0800 |
parents | f62369667a7c |
children | fd2191d870ff |
comparison
equal
deleted
inserted
replaced
36401:d65642840c6f | 36402:ef6ae3f64c23 |
---|---|
2576 for r in parents: | 2576 for r in parents: |
2577 if r.closesbranch() and r.branch() == branch: | 2577 if r.closesbranch() and r.branch() == branch: |
2578 repo.ui.status(_('reopening closed branch head %d\n') % r) | 2578 repo.ui.status(_('reopening closed branch head %d\n') % r) |
2579 | 2579 |
2580 if repo.ui.debugflag: | 2580 if repo.ui.debugflag: |
2581 repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx.hex())) | 2581 repo.ui.write(_('committed changeset %d:%s\n') % (ctx.rev(), ctx.hex())) |
2582 elif repo.ui.verbose: | 2582 elif repo.ui.verbose: |
2583 repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx)) | 2583 repo.ui.write(_('committed changeset %d:%s\n') % (ctx.rev(), ctx)) |
2584 | 2584 |
2585 def postcommitstatus(repo, pats, opts): | 2585 def postcommitstatus(repo, pats, opts): |
2586 return repo.status(match=scmutil.match(repo[None], pats, opts)) | 2586 return repo.status(match=scmutil.match(repo[None], pats, opts)) |
2587 | 2587 |
2588 def revert(ui, repo, ctx, parents, *pats, **opts): | 2588 def revert(ui, repo, ctx, parents, *pats, **opts): |