comparison 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
comparison
equal deleted inserted replaced
53:066dfa5c0b70 54:29d01b5dc38c
265 name, line = line.split(' ', 1) 265 name, line = line.split(' ', 1)
266 rev, node = line.split(':') 266 rev, node = line.split(':')
267 node = node.split()[0] # get rid of ' (inactive)' 267 node = node.split()[0] # get rid of ' (inactive)'
268 branches.append((name, int(rev), node)) 268 branches.append((name, int(rev), node))
269 return branches 269 return branches
270
271 def bundle(self, file, destrepo=None, rev=[], branch=[], base=[], all=False,
272 force=False, type=None, ssh=None, remotecmd=None, insecure=False):
273 """
274 create a changegroup file
275
276 Return True if a bundle was created, False if no changes were found.
277 """
278 args = cmdbuilder('bundle', file, destrepo, f=force, r=rev, b=branch,
279 base=base, a=all, t=type, e=ssh, remotecmd=remotecmd,
280 insecure=insecure)
281
282 eh = util.reterrorhandler(args)
283 self.rawcommand(args, eh=eh)
284
285 return bool(eh)
270 286
271 def cat(self, files, rev=None, output=None): 287 def cat(self, files, rev=None, output=None):
272 args = cmdbuilder('cat', *files, r=rev, o=output) 288 args = cmdbuilder('cat', *files, r=rev, o=output)
273 out = self.rawcommand(args) 289 out = self.rawcommand(args)
274 290