##// END OF EJS Templates
add -p option to tip. for issue 64.
Vadim Gelfer -
r1731:251729df default
parent child Browse files
Show More
@@ -602,9 +602,12 b' tags::'
602
602
603 This lists both regular and local tags.
603 This lists both regular and local tags.
604
604
605 tip::
605 tip [-p]::
606 Show the tip revision.
606 Show the tip revision.
607
607
608 options:
609 -p, --patch show patch
610
608 unbundle <file>::
611 unbundle <file>::
609 (EXPERIMENTAL)
612 (EXPERIMENTAL)
610
613
@@ -2155,13 +2155,15 b' def tags(ui, repo):'
2155 r = " ?:?"
2155 r = " ?:?"
2156 ui.write("%-30s %s\n" % (t, r))
2156 ui.write("%-30s %s\n" % (t, r))
2157
2157
2158 def tip(ui, repo):
2158 def tip(ui, repo, **opts):
2159 """show the tip revision
2159 """show the tip revision
2160
2160
2161 Show the tip revision.
2161 Show the tip revision.
2162 """
2162 """
2163 n = repo.changelog.tip()
2163 n = repo.changelog.tip()
2164 show_changeset(ui, repo, changenode=n)
2164 show_changeset(ui, repo, changenode=n)
2165 if opts['patch']:
2166 dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n)
2165
2167
2166 def unbundle(ui, repo, fname, **opts):
2168 def unbundle(ui, repo, fname, **opts):
2167 """apply a changegroup file
2169 """apply a changegroup file
@@ -2500,7 +2502,7 b' table = {'
2500 ('r', 'rev', '', _('revision to tag'))],
2502 ('r', 'rev', '', _('revision to tag'))],
2501 _('hg tag [-r REV] [OPTION]... NAME')),
2503 _('hg tag [-r REV] [OPTION]... NAME')),
2502 "tags": (tags, [], _('hg tags')),
2504 "tags": (tags, [], _('hg tags')),
2503 "tip": (tip, [], _('hg tip')),
2505 "tip": (tip, [('p', 'patch', None, _('show patch'))], _('hg tip')),
2504 "unbundle":
2506 "unbundle":
2505 (unbundle,
2507 (unbundle,
2506 [('u', 'update', None,
2508 [('u', 'update', None,
General Comments 0
You need to be logged in to leave comments. Login now