##// 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 4952 ('f', 'force', False, _('allow to move boundary backward')),
4953 4953 ('r', 'rev', [], _('target revision'), _('REV')),
4954 4954 ],
4955 _('[-p|-d|-s] [-f] [-r] REV...'))
4955 _('[-p|-d|-s] [-f] [-r] [REV...]'))
4956 4956 def phase(ui, repo, *revs, **opts):
4957 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 4961 With one of -p/--public, -d/--draft or -s/--secret, change the
4962 4962 phase value of the specified revisions.
@@ -4981,7 +4981,9 b' def phase(ui, repo, *revs, **opts):'
4981 4981 revs = list(revs)
4982 4982 revs.extend(opts['rev'])
4983 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 4988 revs = scmutil.revrange(repo, revs)
4987 4989
@@ -36,6 +36,8 b' Following commit are draft too'
36 36 Draft commit are properly created over public one:
37 37
38 38 $ hg phase --public .
39 $ hg phase
40 1: public
39 41 $ hglog
40 42 1 0 B
41 43 0 0 A
@@ -86,6 +88,9 b' Even on merge'
86 88 $ hg merge 4 # E
87 89 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 90 (branch merge, don't forget to commit)
91 $ hg phase
92 6: draft
93 4: secret
89 94 $ hg ci -m "merge B' and E"
90 95 $ hglog
91 96 7 2 merge B' and E
General Comments 0
You need to be logged in to leave comments. Login now