Add support for -r option in hg tag
authorRadoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
Thu, 03 Nov 2005 17:19:59 -0800
changeset 1505 27f08094cfe0
parent 1504 0fcdd126642d
child 1506 11c8b81f95fe
Add support for -r option in hg tag
mercurial/commands.py
--- 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')),