This is an archive of the discontinued Mercurial Phabricator instance.

extdata: avoid crashing inside subprocess when we get a revset parse error
ClosedPublic

Authored by durin42 on Jul 8 2019, 2:05 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Jul 8 2019, 2:05 PM
pulkit accepted this revision.Jul 8 2019, 5:42 PM
This revision is now accepted and ready to land.Jul 8 2019, 5:42 PM
yuja added a subscriber: yuja.Jul 9 2019, 8:18 PM
if proc:
  • proc.communicate()

+ try:
+ proc.communicate()
+ except ValueError:
+ # This happens if we started iterating src and then
+ # get a parse error on a line. It should be safe to ignore.
+ pass

No idea what to do, but maybe the process would be still running if
ValueError occurred.