changeset 53:066dfa5c0b70

client: add archive command
author Idan Kamara <idankk86@gmail.com>
date Fri, 19 Aug 2011 19:47:03 +0300
parents 18f72b255553
children 29d01b5dc38c
files hglib/client.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hglib/client.py	Fri Aug 19 19:46:11 2011 +0300
+++ b/hglib/client.py	Fri Aug 19 19:47:03 2011 +0300
@@ -193,6 +193,16 @@
         for line in out.splitlines():
             yield tuple(line.split(': ', 1))
 
+    def archive(self, dest, rev=None, nodecode=False, prefix=None, type=None,
+                subrepos=False, include=None, exclude=None):
+        """
+        create an unversioned archive of a repository revision
+        """
+        args = cmdbuilder('archive', dest, r=rev, no_decode=nodecode, p=prefix,
+                          t=type, S=subrepos, I=include, X=exclude)
+
+        self.rawcommand(args)
+
     def backout(self, rev, merge=False, parent=None, tool=None, message=None,
                 logfile=None, date=None, user=None):
         if message and logfile: