Mercurial > public > mercurial-scm > python-hglib
comparison hglib/client.py @ 109:9324a89dd84e
client: Be more permissive on the output of update (issue3892)
Some extensions can add lines to the output, we now ignore them
author | Benoit Allard <benoit@aeteurope.nl> |
---|---|
date | Tue, 23 Apr 2013 22:11:26 +0200 |
parents | 86ff8611a8fa |
children | 5d3783aebe5f |
comparison
equal
deleted
inserted
replaced
108:181d1a4115cf | 109:9324a89dd84e |
---|---|
1503 raise error.CommandError(args, ret, out, err) | 1503 raise error.CommandError(args, ret, out, err) |
1504 | 1504 |
1505 | 1505 |
1506 out = self.rawcommand(args, eh=eh) | 1506 out = self.rawcommand(args, eh=eh) |
1507 | 1507 |
1508 # filter out 'merging ...' lines | 1508 m = re.search(r'^(\d+).+, (\d+).+, (\d+).+, (\d+)', out, re.MULTILINE) |
1509 out = util.skiplines(out, 'merging ') | 1509 return tuple(map(int,list(m.groups()))) |
1510 | |
1511 counters = out.rstrip().split(', ') | |
1512 return tuple(int(s.split(' ', 1)[0]) for s in counters) | |
1513 | 1510 |
1514 @property | 1511 @property |
1515 def version(self): | 1512 def version(self): |
1516 """ | 1513 """ |
1517 Return hg version that runs the command server as a 4 fielded tuple: major, | 1514 Return hg version that runs the command server as a 4 fielded tuple: major, |