Mercurial > python-hglib
diff hglib/client.py @ 54:29d01b5dc38c
client: add bundle command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 20:07:56 +0300 |
parents | 066dfa5c0b70 |
children | 5833f6ac0929 |
line wrap: on
line diff
--- a/hglib/client.py Fri Aug 19 19:47:03 2011 +0300 +++ b/hglib/client.py Fri Aug 19 20:07:56 2011 +0300 @@ -268,6 +268,22 @@ branches.append((name, int(rev), node)) return branches + def bundle(self, file, destrepo=None, rev=[], branch=[], base=[], all=False, + force=False, type=None, ssh=None, remotecmd=None, insecure=False): + """ + create a changegroup file + + Return True if a bundle was created, False if no changes were found. + """ + args = cmdbuilder('bundle', file, destrepo, f=force, r=rev, b=branch, + base=base, a=all, t=type, e=ssh, remotecmd=remotecmd, + insecure=insecure) + + eh = util.reterrorhandler(args) + self.rawcommand(args, eh=eh) + + return bool(eh) + def cat(self, files, rev=None, output=None): args = cmdbuilder('cat', *files, r=rev, o=output) out = self.rawcommand(args)