# HG changeset patch # User Pierre-Yves David # Date 2012-01-30 17:06:57 # Node ID 7c967c4a61444c629245dc2721feb75ea72c024a # Parent 90f8b8dd0326c820a1db44b574d554d2554fa39e phase: accept old style revision specification diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4226,17 +4226,20 @@ def phase(ui, repo, *revs, **opts): if not revs: raise util.Abort(_('no revisions specified')) + revs = scmutil.revrange(repo, revs) + lock = None ret = 0 if targetphase is None: # display - for ctx in repo.set('%lr', revs): + for r in revs: + ctx = repo[r] ui.write('%i: %s\n' % (ctx.rev(), ctx.phasestr())) else: lock = repo.lock() try: # set phase - nodes = [ctx.node() for ctx in repo.set('%lr', revs)] + nodes = [ctx.node() for ctx in repo.set('%ld', revs)] if not nodes: raise util.Abort(_('empty revision set')) olddata = repo._phaserev[:]