Mercurial > hg > evolve
changeset 1629:74cf5a69f201
_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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 17 Nov 2015 22:43:17 -0800 |
parents | 48547b4c77de |
children | 9a78ed4b9765 |
files | hgext/inhibit.py tests/test-inhibit.t |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inhibit.py +++ b/hgext/inhibit.py @@ -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:
--- a/tests/test-inhibit.t +++ b/tests/test-inhibit.t @@ -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)