# HG changeset patch # User Joerg Sonnenberger # Date 1719191812 -7200 # Node ID ff523675cd69fff74d7a5997464c8f82f7e222a1 # Parent f28c52a9f7b4187b085371792a8b341bc8d327cc obsolete: simplify relevantmarker Drop duplicate assignment from a merge failure. Save one loop iteration by exploiting that pendingnodes will be seennodes after the first round anyway, so just pre-initialize the set accordingly. From Anton Shestakov's review on !867. Performance difference for my test case is in the noise. diff -r f28c52a9f7b4 -r ff523675cd69 mercurial/obsolete.py --- a/mercurial/obsolete.py Tue Jun 11 18:47:50 2024 +0200 +++ b/mercurial/obsolete.py Mon Jun 24 03:16:52 2024 +0200 @@ -799,8 +799,7 @@ if rev is not None and rev in revs: pendingnodes.add(node) seenmarkers = set() - seenmarkers = set() - seennodes = set() + seennodes = set(pendingnodes) precursorsmarkers = self.predecessors succsmarkers = self.successors children = self.children