Mercurial > public > mercurial-scm > hg
diff tests/simplestorerepo.py @ 37424:06674aab2b4c
simplestore: back up index when adding a revision
This ensures that transaction rollback reverts the index to its
previous state. This fixed a few test failures due to `hg verify`
complaining about a reference to an undefined changeset revision.
Differential Revision: https://phab.mercurial-scm.org/D3104
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 04 Apr 2018 17:53:45 -0700 |
parents | 76d2115cb817 |
children | 9d4f09bfe3ec |
line wrap: on
line diff
--- a/tests/simplestorerepo.py Wed Apr 04 16:00:50 2018 -0700 +++ b/tests/simplestorerepo.py Wed Apr 04 17:53:45 2018 -0700 @@ -405,6 +405,8 @@ return 0, 0 def add(self, text, meta, transaction, linkrev, p1, p2): + transaction.addbackup(self._indexpath) + if meta or text.startswith(b'\1\n'): text = filelog.packmeta(meta, text)