tags: use the 'tag' function from the 'tags' module in the 'tag' command
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 27 Mar 2017 16:00:34 +0200
changeset 31675 adace35f931d
parent 31674 a719f3315366
child 31676 d761ef24d6e1
tags: use the 'tag' function from the 'tags' module in the 'tag' command There is No need to go through the 'repo' object method anymore.
mercurial/commands.py
--- a/mercurial/commands.py	Mon Mar 27 15:58:31 2017 +0200
+++ b/mercurial/commands.py	Mon Mar 27 16:00:34 2017 +0200
@@ -48,6 +48,7 @@
     server,
     sshserver,
     streamclone,
+    tags as tagsmod,
     templatekw,
     ui as uimod,
     util,
@@ -5172,8 +5173,8 @@
             scmutil.revsingle(repo, rev_).rev() == nullrev):
             raise error.Abort(_("cannot tag null revision"))
 
-        repo.tag(names, r, message, opts.get('local'), opts.get('user'), date,
-                 editor=editor)
+        tagsmod.tag(repo, names, r, message, opts.get('local'),
+                    opts.get('user'), date, editor=editor)
     finally:
         release(lock, wlock)