diff hglib/client.py @ 42:b6b75c71ac58

client: add tag command
author Idan Kamara <idankk86@gmail.com>
date Mon, 15 Aug 2011 22:46:45 +0300
parents e185c3922c68
children 77ebb51f5f36
line wrap: on
line diff
--- a/hglib/client.py	Mon Aug 15 22:46:45 2011 +0300
+++ b/hglib/client.py	Mon Aug 15 22:46:45 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)