4950 ('d', 'draft', False, _('set changeset phase to draft')), |
4950 ('d', 'draft', False, _('set changeset phase to draft')), |
4951 ('s', 'secret', False, _('set changeset phase to secret')), |
4951 ('s', 'secret', False, _('set changeset phase to secret')), |
4952 ('f', 'force', False, _('allow to move boundary backward')), |
4952 ('f', 'force', False, _('allow to move boundary backward')), |
4953 ('r', 'rev', [], _('target revision'), _('REV')), |
4953 ('r', 'rev', [], _('target revision'), _('REV')), |
4954 ], |
4954 ], |
4955 _('[-p|-d|-s] [-f] [-r] REV...')) |
4955 _('[-p|-d|-s] [-f] [-r] [REV...]')) |
4956 def phase(ui, repo, *revs, **opts): |
4956 def phase(ui, repo, *revs, **opts): |
4957 """set or show the current phase name |
4957 """set or show the current phase name |
4958 |
4958 |
4959 With no argument, show the phase name of specified revisions. |
4959 With no argument, show the phase name of the current revision(s). |
4960 |
4960 |
4961 With one of -p/--public, -d/--draft or -s/--secret, change the |
4961 With one of -p/--public, -d/--draft or -s/--secret, change the |
4962 phase value of the specified revisions. |
4962 phase value of the specified revisions. |
4963 |
4963 |
4964 Unless -f/--force is specified, :hg:`phase` won't move changeset from a |
4964 Unless -f/--force is specified, :hg:`phase` won't move changeset from a |
4979 |
4979 |
4980 # look for specified revision |
4980 # look for specified revision |
4981 revs = list(revs) |
4981 revs = list(revs) |
4982 revs.extend(opts['rev']) |
4982 revs.extend(opts['rev']) |
4983 if not revs: |
4983 if not revs: |
4984 raise util.Abort(_('no revisions specified')) |
4984 # display both parents as the second parent phase can influence |
|
4985 # the phase of a merge commit |
|
4986 revs = [c.rev() for c in repo[None].parents()] |
4985 |
4987 |
4986 revs = scmutil.revrange(repo, revs) |
4988 revs = scmutil.revrange(repo, revs) |
4987 |
4989 |
4988 lock = None |
4990 lock = None |
4989 ret = 0 |
4991 ret = 0 |