Permalink
Browse files

Fixed potential issue in Repo._GetChangesetInfoList

Under certain circumstances (misconfigured extensions for example),
mercurial's outgoing/incoming commands will print out an error message
as well as the actual outgoing/incoming changesets.  This was causing
synchg to crash when used, as it expects each line of output to match
the ChangesetInfoRegexp.

This commit fixes that, by filtering out None from the list of
changeset matches.
  • Loading branch information...
1 parent 485421c commit 88a9d89967950eecb8df5a2c2e02fa504d448452 @obmarg committed Mar 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 synchg/repo.py
View
@@ -199,7 +199,7 @@ def _GetChangesetInfoList(self, *pargs, **kwargs):
'''
lines = self._RunListCommand(*pargs, **kwargs)
matches = (self.ChangesetInfoRegexp.match(line) for line in lines)
- return [self.ChangesetInfo(**match.groupdict()) for match in matches]
+ return [self.ChangesetInfo(**match.groupdict()) for match in matches if match]
@property
@_CleanMq

0 comments on commit 88a9d89

Please sign in to comment.