Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 1731:251729df9cc6
add -p option to tip. for issue 64.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 15 Feb 2006 11:05:43 -0800 |
parents | 9b92b71d5dd7 |
children | d3e6da334b85 |
comparison
equal
deleted
inserted
replaced
1730:0f1d2c75db5e | 1731:251729df9cc6 |
---|---|
2153 r = "%5d:%s" % (repo.changelog.rev(n), hex(n)) | 2153 r = "%5d:%s" % (repo.changelog.rev(n), hex(n)) |
2154 except KeyError: | 2154 except KeyError: |
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 |
2168 | 2170 |
2169 Apply a compressed changegroup file generated by the bundle | 2171 Apply a compressed changegroup file generated by the bundle |
2498 ('d', 'date', '', _('record datecode as commit date')), | 2500 ('d', 'date', '', _('record datecode as commit date')), |
2499 ('u', 'user', '', _('record user as commiter')), | 2501 ('u', 'user', '', _('record user as commiter')), |
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, |
2507 _('update the working directory to tip after unbundle'))], | 2509 _('update the working directory to tip after unbundle'))], |
2508 _('hg unbundle [-u] FILE')), | 2510 _('hg unbundle [-u] FILE')), |