# HG changeset patch # User Vadim Gelfer # Date 1140030343 28800 # Node ID 251729df9cc6f689c6ba3bd3fc94631506edeceb # Parent 0f1d2c75db5e64bd750f003b9f0155507cf6256f add -p option to tip. for issue 64. diff -r 0f1d2c75db5e -r 251729df9cc6 doc/hg.1.txt --- a/doc/hg.1.txt Wed Feb 15 10:49:30 2006 -0800 +++ b/doc/hg.1.txt Wed Feb 15 11:05:43 2006 -0800 @@ -602,9 +602,12 @@ This lists both regular and local tags. -tip:: +tip [-p]:: Show the tip revision. + options: + -p, --patch show patch + unbundle :: (EXPERIMENTAL) diff -r 0f1d2c75db5e -r 251729df9cc6 mercurial/commands.py --- a/mercurial/commands.py Wed Feb 15 10:49:30 2006 -0800 +++ b/mercurial/commands.py Wed Feb 15 11:05:43 2006 -0800 @@ -2155,13 +2155,15 @@ r = " ?:?" ui.write("%-30s %s\n" % (t, r)) -def tip(ui, repo): +def tip(ui, repo, **opts): """show the tip revision Show the tip revision. """ n = repo.changelog.tip() show_changeset(ui, repo, changenode=n) + if opts['patch']: + dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n) def unbundle(ui, repo, fname, **opts): """apply a changegroup file @@ -2500,7 +2502,7 @@ ('r', 'rev', '', _('revision to tag'))], _('hg tag [-r REV] [OPTION]... NAME')), "tags": (tags, [], _('hg tags')), - "tip": (tip, [], _('hg tip')), + "tip": (tip, [('p', 'patch', None, _('show patch'))], _('hg tip')), "unbundle": (unbundle, [('u', 'update', None,