obsutil: make sure "addedrevs" is not None in getobsoleted()
authorYuya Nishihara <yuya@tcha.org>
Sat, 25 Aug 2018 15:19:43 +0900
changeset 39300 52e6171ec822
parent 39299 7775c1fb8fa0
child 39301 5763216ba311
obsutil: make sure "addedrevs" is not None in getobsoleted() If it were None, "rev in addedrevs" would crash. So tr.changes["revs"] should be a mandatory parameter here.
mercurial/obsutil.py
--- a/mercurial/obsutil.py	Tue May 29 18:13:19 2018 +0200
+++ b/mercurial/obsutil.py	Sat Aug 25 15:19:43 2018 +0900
@@ -465,7 +465,7 @@
     succsmarkers = repo.obsstore.successors.get
     public = phases.public
     addedmarkers = tr.changes.get('obsmarkers')
-    addedrevs = tr.changes.get('revs')
+    addedrevs = tr.changes['revs']
     seenrevs = set()
     obsoleted = set()
     for mark in addedmarkers: