[PATCH 2 of 3 V2] phase: default to current revision if no rev is provided (issue4666)
Gilles Moris
gilles.moris at free.fr
Fri May 15 04:09:25 CDT 2015
# HG changeset patch
# User Gilles Moris <gilles.moris at free.fr>
# Date 1431675981 -7200
# Fri May 15 09:46:21 2015 +0200
# Node ID 506ec227e18df2feb51070a50d4f0cb200f0b227
# Parent b51d7e3407dd0be0807c887c9b6fb82bebf57bf6
phase: default to current revision if no rev is provided (issue4666)
diff -r b51d7e3407dd -r 506ec227e18d mercurial/commands.py
--- a/mercurial/commands.py Thu May 14 17:38:38 2015 +0200
+++ b/mercurial/commands.py Fri May 15 09:46:21 2015 +0200
@@ -4950,11 +4950,11 @@
('f', 'force', False, _('allow to move boundary backward')),
('r', 'rev', [], _('target revision'), _('REV')),
],
- _('[-p|-d|-s] [-f] [-r] REV...'))
+ _('[-p|-d|-s] [-f] [-r] [REV...]'))
def phase(ui, repo, *revs, **opts):
"""set or show the current phase name
- With no argument, show the phase name of specified revisions.
+ With no argument, show the phase name of current revision.
With one of -p/--public, -d/--draft or -s/--secret, change the
phase value of the specified revisions.
@@ -4979,7 +4979,7 @@
revs = list(revs)
revs.extend(opts['rev'])
if not revs:
- raise util.Abort(_('no revisions specified'))
+ revs = [c.rev() for c in repo[None].parents()]
revs = scmutil.revrange(repo, revs)
More information about the Mercurial-devel
mailing list