[PATCH 1 of 3] obsutil: make sure "addedrevs" is not None in getobsoleted()
Yuya Nishihara
yuya at tcha.org
Sat Aug 25 09:46:03 UTC 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1535177983 -32400
# Sat Aug 25 15:19:43 2018 +0900
# Node ID 21d6316839fbd3acd6da8c061329a01490135f2c
# Parent f98d3c57906fd31a3068446a5448a655cc22f108
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.
diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -465,7 +465,7 @@ def getobsoleted(repo, tr):
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:
More information about the Mercurial-devel
mailing list