Patchwork D274: obsutil: defend against succsmarkers() returning None

login
register
mail settings
Submitter phabricator
Date Aug. 8, 2017, 7:49 p.m.
Message ID <differential-rev-PHID-DREV-r2qtugxkrlhb3ubcwayp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/22765/
State Superseded
Headers show

Comments

phabricator - Aug. 8, 2017, 7:49 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm not sure if this is a realistic problem, but doing this avoids
  some pretty awful test failures on Python 3, and it looks like it
  should be harmless.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D274

AFFECTED FILES
  mercurial/obsutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -307,7 +307,7 @@ 
         seenrevs.add(rev)
         if phase(repo, rev) == public:
             continue
-        if set(succsmarkers(node)).issubset(addedmarkers):
+        if set(succsmarkers(node) or []).issubset(addedmarkers):
             obsoleted.add(rev)
     return obsoleted