# HG changeset patch # User Idan Kamara # Date 1313782060 -10800 # Node ID d0b9215180a46cd1952aaa4e24e3e703b927ce67 # Parent ce516ed9bc0da118ee023a9f7269652012ddb7e1 client: fix diff indentation and position diff -r ce516ed9bc0d -r d0b9215180a4 hglib/client.py --- a/hglib/client.py Fri Aug 19 20:15:03 2011 +0300 +++ b/hglib/client.py Fri Aug 19 22:27:40 2011 +0300 @@ -369,6 +369,22 @@ return bool(eh) + def diff(self, files=[], revs=[], change=None, text=False, + git=False, nodates=False, showfunction=False, reverse=False, + ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False, + unified=None, stat=False, subrepos=False, include=None, exclude=None): + if change and revs: + raise ValueError('cannot specify both change and rev') + + args = cmdbuilder('diff', *files, r=revs, c=change, + a=text, g=git, nodates=nodates, + p=showfunction, reverse=reverse, + w=ignoreallspace, b=ignorespacechange, + B=ignoreblanklines, U=unified, stat=stat, + S=subrepos, I=include, X=exclude) + + return self.rawcommand(args) + def export(self, revs, output=None, switchparent=False, text=False, git=False, nodates=False): """ @@ -452,22 +468,6 @@ out = self.rawcommand(args, eh=eh).split('\0')[:-1] return self._parserevs(out) - def diff(self, files=[], revs=[], change=None, text=False, - git=False, nodates=False, showfunction=False, reverse=False, - ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False, - unified=None, stat=False, subrepos=False, include=None, exclude=None): - if change and revs: - raise ValueError('cannot specify both change and rev') - - args = cmdbuilder('diff', *files, r=revs, c=change, - a=text, g=git, nodates=nodates, - p=showfunction, reverse=reverse, - w=ignoreallspace, b=ignorespacechange, - B=ignoreblanklines, U=unified, stat=stat, - S=subrepos, I=include, X=exclude) - - return self.rawcommand(args) - def identify(self, rev=None, source=None, num=False, id=False, branch=False, tags=False, bookmarks=False): args = cmdbuilder('identify', source, r=rev, n=num, i=id, b=branch, t=tags,