Mercurial > python-hglib
comparison hglib/client.py @ 18:518149e32888
client: add parents command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 11 Aug 2011 15:20:49 +0300 |
parents | b68c444d42bb |
children | 6a9d16ddae31 |
comparison
equal
deleted
inserted
replaced
17:b68c444d42bb | 18:518149e32888 |
---|---|
294 return [] | 294 return [] |
295 | 295 |
296 out = util.eatlines(out, 2).split('\0')[:-1] | 296 out = util.eatlines(out, 2).split('\0')[:-1] |
297 return self._parserevs(out) | 297 return self._parserevs(out) |
298 | 298 |
299 def parents(self, rev=None, file=None): | |
300 args = cmdbuilder('parents', file, template=templates.changeset, r=rev) | |
301 | |
302 out = self.rawcommand(args) | |
303 if not out: | |
304 return | |
305 | |
306 out = out.split('\0')[:-1] | |
307 | |
308 return self._parserevs(out) | |
309 | |
299 def paths(self, name=None): | 310 def paths(self, name=None): |
300 if not name: | 311 if not name: |
301 out = self.rawcommand(['paths']) | 312 out = self.rawcommand(['paths']) |
302 if not out: | 313 if not out: |
303 return {} | 314 return {} |