Implements lighttransaction(repo) which improves performance of hg undo and
prevents infinite loops caused by hooks that run true hg commands. Also adds
_getrevlog and _invertindex commands, factoring out code that will be reused.
Changes output for gaps when typing hg debugundohistory -l for slightly
better ui and clearer testing. Lastly, changes lock from repo lock to new
undolog lock and tests this. In the future, with some changes to undo.log,
we may be able to take the lock later, bypassing the need to take it for
read-only operations.
Differential Revision: https://phab.mercurial-scm.org/D50
This is the result of running a codemod script:
python ~/hg/contrib/codemod/codemod_nestedwith.py **/*.py
Plus a manual cleanup that removes the comment in `absorb/__init.py`.
See D76 for the codemod script.
Differential Revision: https://phab.mercurial-scm.org/D78
Summary:
Makes sure repo is filtered by the "visible" filter which hides hidden commits.
Otherwise --hidden flag can mass up "draftheads" storage.
Test Plan: Added a new test case.
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: quark, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5357222
Tasks: 19822306
Signature: t1:5357222:1499102417:ce78065d36841601fe0dfb1d615d7b3be28c5870
Summary: amend performs two transactions, second without command which breaks our assertion, but possibly isn't an issue. This fixes the assertion.
Test Plan: unit tests
Reviewers: #mercurial, stash, quark
Reviewed By: quark
Subscribers: quark, stash, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5326358
Tasks: 19261492
Signature: t1:5326358:1498684945:0fde1df243cdbac67ceb092d30599ebd56a731a5