Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1762:8eaa8e06a364
Add option -b/--branch to hg tip (as done for hg parents).
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 21 Feb 2006 12:59:16 +0100 |
parents | 7eb1934f83fb |
children | fa34a74efc40 |
comparison
equal
deleted
inserted
replaced
1761:7eb1934f83fb | 1762:8eaa8e06a364 |
---|---|
2223 """show the tip revision | 2223 """show the tip revision |
2224 | 2224 |
2225 Show the tip revision. | 2225 Show the tip revision. |
2226 """ | 2226 """ |
2227 n = repo.changelog.tip() | 2227 n = repo.changelog.tip() |
2228 show_changeset(ui, repo, changenode=n) | 2228 br = None |
2229 if opts['branch']: | |
2230 br = repo.branchlookup([n]) | |
2231 show_changeset(ui, repo, changenode=n, brinfo=br) | |
2229 if opts['patch']: | 2232 if opts['patch']: |
2230 dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n) | 2233 dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n) |
2231 | 2234 |
2232 def unbundle(ui, repo, fname, **opts): | 2235 def unbundle(ui, repo, fname, **opts): |
2233 """apply a changegroup file | 2236 """apply a changegroup file |
2575 ('d', 'date', '', _('record datecode as commit date')), | 2578 ('d', 'date', '', _('record datecode as commit date')), |
2576 ('u', 'user', '', _('record user as commiter')), | 2579 ('u', 'user', '', _('record user as commiter')), |
2577 ('r', 'rev', '', _('revision to tag'))], | 2580 ('r', 'rev', '', _('revision to tag'))], |
2578 _('hg tag [-r REV] [OPTION]... NAME')), | 2581 _('hg tag [-r REV] [OPTION]... NAME')), |
2579 "tags": (tags, [], _('hg tags')), | 2582 "tags": (tags, [], _('hg tags')), |
2580 "tip": (tip, [('p', 'patch', None, _('show patch'))], _('hg tip')), | 2583 "tip": |
2584 (tip, | |
2585 [('b', 'branch', None, _('show branches')), | |
2586 ('p', 'patch', None, _('show patch'))], | |
2587 _('hg [-b] [-p] tip')), | |
2581 "unbundle": | 2588 "unbundle": |
2582 (unbundle, | 2589 (unbundle, |
2583 [('u', 'update', None, | 2590 [('u', 'update', None, |
2584 _('update the working directory to tip after unbundle'))], | 2591 _('update the working directory to tip after unbundle'))], |
2585 _('hg unbundle [-u] FILE')), | 2592 _('hg unbundle [-u] FILE')), |