##// END OF EJS Templates
phase: default to current revision if no rev is provided (issue4666)
Gilles Moris -
r25120:a7701001 default
parent child Browse files
Show More
@@ -4952,11 +4952,11 b' def paths(ui, repo, search=None):'
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.
@@ -4981,7 +4981,9 b' def phase(ui, repo, *revs, **opts):'
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
@@ -36,6 +36,8 b' Following commit are draft too'
36 Draft commit are properly created over public one:
36 Draft commit are properly created over public one:
37
37
38 $ hg phase --public .
38 $ hg phase --public .
39 $ hg phase
40 1: public
39 $ hglog
41 $ hglog
40 1 0 B
42 1 0 B
41 0 0 A
43 0 0 A
@@ -86,6 +88,9 b' Even on merge'
86 $ hg merge 4 # E
88 $ hg merge 4 # E
87 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 (branch merge, don't forget to commit)
90 (branch merge, don't forget to commit)
91 $ hg phase
92 6: draft
93 4: secret
89 $ hg ci -m "merge B' and E"
94 $ hg ci -m "merge B' and E"
90 $ hglog
95 $ hglog
91 7 2 merge B' and E
96 7 2 merge B' and E
General Comments 0
You need to be logged in to leave comments. Login now