Mercurial > python-hglib
comparison hglib/client.py @ 55:5833f6ac0929
client: add export command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 20:08:13 +0300 |
parents | 29d01b5dc38c |
children | 9bd819da245a |
comparison
equal
deleted
inserted
replaced
54:29d01b5dc38c | 55:5833f6ac0929 |
---|---|
366 | 366 |
367 eh = util.reterrorhandler(args) | 367 eh = util.reterrorhandler(args) |
368 self.rawcommand(args, eh=eh) | 368 self.rawcommand(args, eh=eh) |
369 | 369 |
370 return bool(eh) | 370 return bool(eh) |
371 | |
372 def export(self, revs, output=None, switchparent=False, text=False, git=False, | |
373 nodates=False): | |
374 """ | |
375 Return the header and diffs for one or more changesets. When output is | |
376 given, dumps to file. | |
377 """ | |
378 if not isinstance(revs, list): | |
379 revs = [revs] | |
380 args = cmdbuilder('export', *revs, o=output, switch_parent=switchparent, | |
381 a=text, g=git, nodates=nodates) | |
382 | |
383 out = self.rawcommand(args) | |
384 | |
385 if output is None: | |
386 return out | |
371 | 387 |
372 def forget(self, files, include=None, exclude=None): | 388 def forget(self, files, include=None, exclude=None): |
373 if not isinstance(files, list): | 389 if not isinstance(files, list): |
374 files = [files] | 390 files = [files] |
375 | 391 |