changeset 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
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Nov 03 14:24:07 2005 -0800
+++ b/mercurial/commands.py	Thu Nov 03 17:19:59 2005 -0800
@@ -1979,6 +1979,8 @@
     """
     if name == "tip":
         raise util.Abort(_("the name 'tip' is reserved"))
+    if 'rev' in opts:
+        rev = opts['rev']
     if rev:
         r = hex(repo.lookup(rev))
     else:
@@ -2333,7 +2335,8 @@
          [('l', 'local', None, _('make the tag local')),
           ('m', 'message', "", _('message for tag commit log entry')),
           ('d', 'date', "", _('record datecode as commit date')),
-          ('u', 'user', "", _('record user as commiter'))],
+          ('u', 'user', "", _('record user as commiter')),
+          ('r', 'rev', "", _('revision to tag'))],
          _('hg tag [OPTION]... NAME [REV]')),
     "tags": (tags, [], _('hg tags')),
     "tip": (tip, [], _('hg tip')),