inhibit: use 'repo.revs' instead of 'repo.set'
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 17 Nov 2015 20:19:32 -0800
changeset 1534 9a78ed4b9765
parent 1533 74cf5a69f201
child 1535 f6d10432499d
inhibit: use 'repo.revs' instead of 'repo.set' This skip the creation of a changectx object.
hgext/inhibit.py
--- a/hgext/inhibit.py	Tue Nov 17 22:43:17 2015 -0800
+++ b/hgext/inhibit.py	Tue Nov 17 20:19:32 2015 -0800
@@ -129,13 +129,14 @@
     if not _inhibitenabled(repo):
         return
 
-    newinhibit = list(repo.set('::%ln and obsolete()', nodes))
+    newinhibit = repo.revs('::%ln and obsolete()', nodes)
     if newinhibit:
+        node = repo.changelog.node
         lock = tr = None
         try:
             lock = repo.lock()
             tr = repo.transaction('obsinhibit')
-            repo._obsinhibit.update(c.node() for c in newinhibit)
+            repo._obsinhibit.update(node(r) for r in newinhibit)
             _schedulewrite(tr, _filterpublic(repo, repo._obsinhibit))
             repo.invalidatevolatilesets()
             tr.close()