comparison hglib/client.py @ 37:5506a241c826

client: add diff command
author Idan Kamara <idankk86@gmail.com>
date Mon, 15 Aug 2011 22:46:45 +0300
parents 1e33bbea23e5
children 32f6a2bbf63e
comparison
equal deleted inserted replaced
36:00bb0701323a 37:5506a241c826
338 raise error.CommandError(args, ret, out, err) 338 raise error.CommandError(args, ret, out, err)
339 339
340 out = self.rawcommand(args, eh=eh) 340 out = self.rawcommand(args, eh=eh)
341 return not warnings[0] 341 return not warnings[0]
342 342
343 def diff(self, files=[], revs=[], change=None, text=False,
344 git=False, nodates=False, showfunction=False, reverse=False,
345 ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False,
346 unified=None, stat=False, subrepos=False, include=None, exclude=None):
347 if change and revs:
348 raise ValueError('cannot specify both change and rev')
349
350 args = cmdbuilder('diff', *files, r=revs, c=change,
351 a=text, g=git, nodates=nodates,
352 p=showfunction, reverse=reverse,
353 w=ignoreallspace, b=ignorespacechange,
354 B=ignoreblanklines, U=unified, stat=stat,
355 S=subrepos, I=include, X=exclude)
356
357 return self.rawcommand(args)
358
343 def import_(self, patches, strip=None, force=False, nocommit=False, 359 def import_(self, patches, strip=None, force=False, nocommit=False,
344 bypass=False, exact=False, importbranch=False, message=None, 360 bypass=False, exact=False, importbranch=False, message=None,
345 date=None, user=None, similarity=None): 361 date=None, user=None, similarity=None):
346 """ 362 """
347 patches can be a list of file names with patches to apply 363 patches can be a list of file names with patches to apply