test-removeemptydirs: clarify the state of things in the `histedit` case
This make the test easier to follow and will help to compare with the behavior
on windows.
Differential Revision: https://phab.mercurial-scm.org/D11054
--- a/tests/test-removeemptydirs.t Fri Jul 09 20:09:46 2021 +0200
+++ b/tests/test-removeemptydirs.t Sat Jul 10 02:18:56 2021 +0200
@@ -1,6 +1,7 @@
Tests for experimental.removeemptydirs
$ NO_RM=--config=experimental.removeemptydirs=0
+ $ DO_RM=--config=experimental.removeemptydirs=1
$ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi }
$ isfile() { if [ -f $1 ]; then echo yes; else echo no; fi }
@@ -98,6 +99,10 @@
Histediting across a commit that doesn't have the directory, from inside the
directory (reordering nodes):
+
+A directory with the right pass exists at the end of the run, but it is a
+different directory than the current one.
+
$ hg init hghistedit
$ cd hghistedit
$ echo hi > r0
@@ -116,12 +121,28 @@
> pick b550aa12d873 2 r2
> EOF
$ cd $TESTTMP/hghistedit/somedir
- $ hg --config extensions.histedit= histedit -q --commands ../histedit_commands
+ $ hg $DO_RM --config extensions.histedit= histedit -q --commands ../histedit_commands
current directory was removed
(consider changing to repo root: $TESTTMP/hghistedit)
+ $ ls -1 $TESTTMP/hghistedit/
+ histedit_commands
+ r0
+ r1
+ r2
+ somedir
+ $ pwd
+ $TESTTMP/hghistedit/somedir
+ $ ls -1 $TESTTMP/hghistedit/somedir
+ foo
+ $ ls -1
+
+Get out of the doomed directory
+
+ $ cd $TESTTMP/hghistedit
+ $ hg files --rev . | grep somedir/
+ somedir/foo
- $ cd $TESTTMP/hghistedit
$ cat > histedit_commands <<EOF
> pick 89079fab8aee 0 r0
> pick 7c7a22c6009f 3 migrating_revision