tests/test-contrib-emacs.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 15 Feb 2023 11:51:58 +0100
changeset 50085 28dfb2df4ab9
parent 45460 814c7430f828
permissions -rw-r--r--
commit: use `dirstate.change_files` to scope the associated `addremove` This was significantly more complicated than I expected, because multiple extensions get in the way. I introduced a context that lazily open the transaction and associated context to work around these complication. See the inline documentation for details. Introducing the wrapping transaction remove the need for dirstate-guard (one of the ultimate goal of all this), and slightly affect the result of a `hg rollback` after a `hg commit --addremove`. That last part is deemed fine. It aligns the behavior with what happens after a failed `hg commit --addremove` and nobody should be using `hg rollback` anyway. The small output change in the test come from the different transaction timing and fact the transaction now backup the dirstate before the addremove, which might mean "no file to backup" when the repository starts from an empty state.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41797
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
#require emacs
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
  $ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
  >  -f ert-run-tests-batch-and-exit
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
  Running 1 tests (*) (glob)
45460
814c7430f828 tests: make emacs test less strict
Martin von Zweigbergk <martinvonz@google.com>
parents: 41797
diff changeset
     5
     passed  1/1  hg-test-mode--compilation-mode-support* (glob)
41797
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
  
45460
814c7430f828 tests: make emacs test less strict
Martin von Zweigbergk <martinvonz@google.com>
parents: 41797
diff changeset
     7
  Ran 1 tests, 1 results as expected* (glob)
41797
19979b8b87e2 tests: add test for hg-test-mode emacs code
Augie Fackler <augie@google.com>
parents:
diff changeset
     8