Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 1505:27f08094cfe0
Add support for -r option in hg tag
author | Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> |
---|---|
date | Thu, 03 Nov 2005 17:19:59 -0800 |
parents | 0fcdd126642d |
children | 11c8b81f95fe |
comparison
equal
deleted
inserted
replaced
1504:0fcdd126642d | 1505:27f08094cfe0 |
---|---|
1977 similarly to other project files and can be hand-edited if | 1977 similarly to other project files and can be hand-edited if |
1978 necessary. | 1978 necessary. |
1979 """ | 1979 """ |
1980 if name == "tip": | 1980 if name == "tip": |
1981 raise util.Abort(_("the name 'tip' is reserved")) | 1981 raise util.Abort(_("the name 'tip' is reserved")) |
1982 if 'rev' in opts: | |
1983 rev = opts['rev'] | |
1982 if rev: | 1984 if rev: |
1983 r = hex(repo.lookup(rev)) | 1985 r = hex(repo.lookup(rev)) |
1984 else: | 1986 else: |
1985 r = hex(repo.changelog.tip()) | 1987 r = hex(repo.changelog.tip()) |
1986 | 1988 |
2331 "tag": | 2333 "tag": |
2332 (tag, | 2334 (tag, |
2333 [('l', 'local', None, _('make the tag local')), | 2335 [('l', 'local', None, _('make the tag local')), |
2334 ('m', 'message', "", _('message for tag commit log entry')), | 2336 ('m', 'message', "", _('message for tag commit log entry')), |
2335 ('d', 'date', "", _('record datecode as commit date')), | 2337 ('d', 'date', "", _('record datecode as commit date')), |
2336 ('u', 'user', "", _('record user as commiter'))], | 2338 ('u', 'user', "", _('record user as commiter')), |
2339 ('r', 'rev', "", _('revision to tag'))], | |
2337 _('hg tag [OPTION]... NAME [REV]')), | 2340 _('hg tag [OPTION]... NAME [REV]')), |
2338 "tags": (tags, [], _('hg tags')), | 2341 "tags": (tags, [], _('hg tags')), |
2339 "tip": (tip, [], _('hg tip')), | 2342 "tip": (tip, [], _('hg tip')), |
2340 "unbundle": | 2343 "unbundle": |
2341 (unbundle, | 2344 (unbundle, |