mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Add option -b/--branch to hg tip (as done for hg parents).
This commit is contained in:
parent
0cbef7be6f
commit
18551d6c25
@ -2225,7 +2225,10 @@ def tip(ui, repo, **opts):
|
||||
Show the tip revision.
|
||||
"""
|
||||
n = repo.changelog.tip()
|
||||
show_changeset(ui, repo, changenode=n)
|
||||
br = None
|
||||
if opts['branch']:
|
||||
br = repo.branchlookup([n])
|
||||
show_changeset(ui, repo, changenode=n, brinfo=br)
|
||||
if opts['patch']:
|
||||
dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n)
|
||||
|
||||
@ -2577,7 +2580,11 @@ table = {
|
||||
('r', 'rev', '', _('revision to tag'))],
|
||||
_('hg tag [-r REV] [OPTION]... NAME')),
|
||||
"tags": (tags, [], _('hg tags')),
|
||||
"tip": (tip, [('p', 'patch', None, _('show patch'))], _('hg tip')),
|
||||
"tip":
|
||||
(tip,
|
||||
[('b', 'branch', None, _('show branches')),
|
||||
('p', 'patch', None, _('show patch'))],
|
||||
_('hg [-b] [-p] tip')),
|
||||
"unbundle":
|
||||
(unbundle,
|
||||
[('u', 'update', None,
|
||||
|
Loading…
Reference in New Issue
Block a user