Patchwork [evolve-ext] inhibit: fix _filterpublic

login
register
mail settings
Submitter Laurent Charignon
Date Jan. 10, 2016, 6:52 p.m.
Message ID <99776fd528c036da9532.1452451971@dev5073.prn1.facebook.com>
Download mbox | patch
Permalink /patch/12630/
State Changes Requested
Delegated to: Pierre-Yves David
Headers show

Comments

Laurent Charignon - Jan. 10, 2016, 6:52 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1452451944 28800
#      Sun Jan 10 10:52:24 2016 -0800
# Node ID 99776fd528c036da95325291faf61d2e0eb2835b
# Parent  4f83b2d2d20de55b2a63910ff10204af9106fd26
inhibit: fix _filterpublic

Before this patch, _filterpublic would always filter rep._obsinhibit and not
its "nodes" argument. Fortunately, we always called it with repo._obsinhibit as
its "nodes" argument!

Patch

diff --git a/hgext/inhibit.py b/hgext/inhibit.py
--- a/hgext/inhibit.py
+++ b/hgext/inhibit.py
@@ -122,7 +122,7 @@ 
     Public changesets are already immune to obsolescence"""
     getrev = repo.changelog.nodemap.get
     getphase = repo._phasecache.phase
-    return (n for n in repo._obsinhibit
+    return (n for n in nodes
             if getrev(n) is not None and getphase(repo, getrev(n)))
 
 def _inhibitmarkers(repo, nodes):