# HG changeset patch # User Pierre-Yves David # Date 1447828997 28800 # Node ID 74cf5a69f2016e868162cc3182d349b7fe6bb288 # Parent 48547b4c77defdd17c670b1eb0eb94272edf0207 _inhibitmarkers: turn the result from generator into a list A generator object is always True, we have to turn it into a list in order to be able to use it in the tests. Before this patch we were rewriting the 'obsinhibit' file all the time, this had a performance impact especially on repository where transaction are expensive (hooks, cache invalidation, etc). Writing this file less often have a minor effect on test where a stripped changeset does not get removed from the obsinhibit file is still inhibited when unbundled back. I think this is fine and I'm moving forward. diff -r 48547b4c77de -r 74cf5a69f201 hgext/inhibit.py --- a/hgext/inhibit.py Fri Nov 06 21:37:38 2015 -0500 +++ b/hgext/inhibit.py Tue Nov 17 22:43:17 2015 -0800 @@ -129,7 +129,7 @@ if not _inhibitenabled(repo): return - newinhibit = repo.set('::%ln and obsolete()', nodes) + newinhibit = list(repo.set('::%ln and obsolete()', nodes)) if newinhibit: lock = tr = None try: diff -r 48547b4c77de -r 74cf5a69f201 tests/test-inhibit.t --- a/tests/test-inhibit.t Fri Nov 06 21:37:38 2015 -0500 +++ b/tests/test-inhibit.t Tue Nov 17 22:43:17 2015 -0800 @@ -651,7 +651,7 @@ adding manifests adding file changes added 2 changesets with 1 changes to 2 files (+1 heads) - (run 'hg heads' to see heads, 'hg merge' to merge) + (run 'hg heads .' to see heads, 'hg merge' to merge) Only allow direct access and check that evolve works like before (also disable evolve commands to avoid hint about using evolve)