comparison hglib/client.py @ 61:d0b9215180a4

client: fix diff indentation and position
author Idan Kamara <idankk86@gmail.com>
date Fri, 19 Aug 2011 22:27:40 +0300
parents 2657fd6fef04
children d1f57f162274
comparison
equal deleted inserted replaced
60:ce516ed9bc0d 61:d0b9215180a4
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 371
372 def diff(self, files=[], revs=[], change=None, text=False,
373 git=False, nodates=False, showfunction=False, reverse=False,
374 ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False,
375 unified=None, stat=False, subrepos=False, include=None, exclude=None):
376 if change and revs:
377 raise ValueError('cannot specify both change and rev')
378
379 args = cmdbuilder('diff', *files, r=revs, c=change,
380 a=text, g=git, nodates=nodates,
381 p=showfunction, reverse=reverse,
382 w=ignoreallspace, b=ignorespacechange,
383 B=ignoreblanklines, U=unified, stat=stat,
384 S=subrepos, I=include, X=exclude)
385
386 return self.rawcommand(args)
387
372 def export(self, revs, output=None, switchparent=False, text=False, git=False, 388 def export(self, revs, output=None, switchparent=False, text=False, git=False,
373 nodates=False): 389 nodates=False):
374 """ 390 """
375 Return the header and diffs for one or more changesets. When output is 391 Return the header and diffs for one or more changesets. When output is
376 given, dumps to file. 392 given, dumps to file.
449 raise error.CommandError(args, ret, out, err) 465 raise error.CommandError(args, ret, out, err)
450 return '' 466 return ''
451 467
452 out = self.rawcommand(args, eh=eh).split('\0')[:-1] 468 out = self.rawcommand(args, eh=eh).split('\0')[:-1]
453 return self._parserevs(out) 469 return self._parserevs(out)
454
455 def diff(self, files=[], revs=[], change=None, text=False,
456 git=False, nodates=False, showfunction=False, reverse=False,
457 ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False,
458 unified=None, stat=False, subrepos=False, include=None, exclude=None):
459 if change and revs:
460 raise ValueError('cannot specify both change and rev')
461
462 args = cmdbuilder('diff', *files, r=revs, c=change,
463 a=text, g=git, nodates=nodates,
464 p=showfunction, reverse=reverse,
465 w=ignoreallspace, b=ignorespacechange,
466 B=ignoreblanklines, U=unified, stat=stat,
467 S=subrepos, I=include, X=exclude)
468
469 return self.rawcommand(args)
470 470
471 def identify(self, rev=None, source=None, num=False, id=False, branch=False, 471 def identify(self, rev=None, source=None, num=False, id=False, branch=False,
472 tags=False, bookmarks=False): 472 tags=False, bookmarks=False):
473 args = cmdbuilder('identify', source, r=rev, n=num, i=id, b=branch, t=tags, 473 args = cmdbuilder('identify', source, r=rev, n=num, i=id, b=branch, t=tags,
474 B=bookmarks) 474 B=bookmarks)