Mercurial > python-hglib
comparison hglib/client.py @ 57:2657fd6fef04
client: add heads command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 20:08:13 +0300 |
parents | 9bd819da245a |
children | d0b9215180a4 |
comparison
equal
deleted
inserted
replaced
56:9bd819da245a | 57:2657fd6fef04 |
---|---|
431 fieldcount += 1 | 431 fieldcount += 1 |
432 if fileswithmatches: | 432 if fileswithmatches: |
433 fieldcount -= 1 | 433 fieldcount -= 1 |
434 | 434 |
435 return util.grouper(fieldcount, out) | 435 return util.grouper(fieldcount, out) |
436 | |
437 def heads(self, rev=[], startrev=[], topological=False, closed=False): | |
438 """ | |
439 Return a list of current repository heads or branch heads | |
440 """ | |
441 if not isinstance(rev, list): | |
442 rev = [rev] | |
443 | |
444 args = cmdbuilder('heads', *rev, r=startrev, t=topological, c=closed, | |
445 template=templates.changeset) | |
446 | |
447 def eh(ret, out, err): | |
448 if ret != 1: | |
449 raise error.CommandError(args, ret, out, err) | |
450 return '' | |
451 | |
452 out = self.rawcommand(args, eh=eh).split('\0')[:-1] | |
453 return self._parserevs(out) | |
436 | 454 |
437 def diff(self, files=[], revs=[], change=None, text=False, | 455 def diff(self, files=[], revs=[], change=None, text=False, |
438 git=False, nodates=False, showfunction=False, reverse=False, | 456 git=False, nodates=False, showfunction=False, reverse=False, |
439 ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False, | 457 ignoreallspace=False, ignorespacechange=False, ignoreblanklines=False, |
440 unified=None, stat=False, subrepos=False, include=None, exclude=None): | 458 unified=None, stat=False, subrepos=False, include=None, exclude=None): |