Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 1654:b7fc961507db
deprecate the use of 'hg tag NAME [REV]'
add some tests and some doc
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 29 Jan 2006 17:12:31 +1300 |
parents | 80640ef93aec |
children | dbb8bba48510 |
comparison
equal
deleted
inserted
replaced
1653:e8a3df8b62b3 | 1654:b7fc961507db |
---|---|
2077 If no revision is given, the tip is used. | 2077 If no revision is given, the tip is used. |
2078 | 2078 |
2079 To facilitate version control, distribution, and merging of tags, | 2079 To facilitate version control, distribution, and merging of tags, |
2080 they are stored as a file named ".hgtags" which is managed | 2080 they are stored as a file named ".hgtags" which is managed |
2081 similarly to other project files and can be hand-edited if | 2081 similarly to other project files and can be hand-edited if |
2082 necessary. | 2082 necessary. The file '.hg/localtags' is used for local tags (not |
2083 shared among repositories). | |
2083 """ | 2084 """ |
2084 if name == "tip": | 2085 if name == "tip": |
2085 raise util.Abort(_("the name 'tip' is reserved")) | 2086 raise util.Abort(_("the name 'tip' is reserved")) |
2087 if rev_ is not None: | |
2088 ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, " | |
2089 "please use 'hg tag [-r REV] NAME instead\n")) | |
2090 if opts['rev']: | |
2091 raise util.Abort(_("use only one form to specify the revision")) | |
2086 if opts['rev']: | 2092 if opts['rev']: |
2087 rev_ = opts['rev'] | 2093 rev_ = opts['rev'] |
2088 if rev_: | 2094 if rev_: |
2089 r = hex(repo.lookup(rev_)) | 2095 r = hex(repo.lookup(rev_)) |
2090 else: | 2096 else: |
2468 [('l', 'local', None, _('make the tag local')), | 2474 [('l', 'local', None, _('make the tag local')), |
2469 ('m', 'message', '', _('message for tag commit log entry')), | 2475 ('m', 'message', '', _('message for tag commit log entry')), |
2470 ('d', 'date', '', _('record datecode as commit date')), | 2476 ('d', 'date', '', _('record datecode as commit date')), |
2471 ('u', 'user', '', _('record user as commiter')), | 2477 ('u', 'user', '', _('record user as commiter')), |
2472 ('r', 'rev', '', _('revision to tag'))], | 2478 ('r', 'rev', '', _('revision to tag'))], |
2473 _('hg tag [OPTION]... NAME [REV]')), | 2479 _('hg tag [-r REV] [OPTION]... NAME')), |
2474 "tags": (tags, [], _('hg tags')), | 2480 "tags": (tags, [], _('hg tags')), |
2475 "tip": (tip, [], _('hg tip')), | 2481 "tip": (tip, [], _('hg tip')), |
2476 "unbundle": | 2482 "unbundle": |
2477 (unbundle, | 2483 (unbundle, |
2478 [('u', 'update', None, | 2484 [('u', 'update', None, |