[PATCH 8 of 9 hglib] client: add tag command

Idan Kamara idankk86 at gmail.com
Mon Aug 15 14:20:49 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1313435878 -10800
# Node ID 08f546914d3fb780f912115e2ecff8d0f8c8cbdd
# Parent  5b26529cdeeec3d7075792cf46c511ded8a1e893
client: add tag command

diff -r 5b26529cdeee -r 08f546914d3f hglib/client.py
--- a/hglib/client.py	Mon Aug 15 22:14:03 2011 +0300
+++ b/hglib/client.py	Mon Aug 15 22:17:58 2011 +0300
@@ -613,6 +613,16 @@
 
         return l
 
+    def tag(self, names, rev=None, message=None, force=False, local=False,
+            remove=False, date=None, user=None):
+        if not isinstance(names, list):
+            names = [names]
+
+        args = cmdbuilder('tag', *names, r=rev, m=message, f=force, l=local,
+                          remove=remove, d=date, u=user)
+
+        self.rawcommand(args)
+
     def tip(self):
         args = cmdbuilder('tip', template=templates.changeset)
         out = self.rawcommand(args)


More information about the Mercurial-devel mailing list