Mercurial > python-hglib
diff 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 |
line wrap: on
line diff
--- a/hglib/client.py Tue Apr 02 01:11:47 2013 -0500 +++ b/hglib/client.py Tue Apr 23 22:11:26 2013 +0200 @@ -1505,11 +1505,8 @@ out = self.rawcommand(args, eh=eh) - # filter out 'merging ...' lines - out = util.skiplines(out, 'merging ') - - counters = out.rstrip().split(', ') - return tuple(int(s.split(' ', 1)[0]) for s in counters) + m = re.search(r'^(\d+).+, (\d+).+, (\d+).+, (\d+)', out, re.MULTILINE) + return tuple(map(int,list(m.groups()))) @property def version(self):