##// END OF EJS Templates
test-removeemptydirs: clarify the state of things in the `histedit` case...
marmoute -
r48379:f2846abd default
parent child Browse files
Show More
@@ -1,6 +1,7 b''
1 Tests for experimental.removeemptydirs
1 Tests for experimental.removeemptydirs
2
2
3 $ NO_RM=--config=experimental.removeemptydirs=0
3 $ NO_RM=--config=experimental.removeemptydirs=0
4 $ DO_RM=--config=experimental.removeemptydirs=1
4 $ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi }
5 $ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi }
5 $ isfile() { if [ -f $1 ]; then echo yes; else echo no; fi }
6 $ isfile() { if [ -f $1 ]; then echo yes; else echo no; fi }
6
7
@@ -98,6 +99,10 b' This should not output anything about cu'
98
99
99 Histediting across a commit that doesn't have the directory, from inside the
100 Histediting across a commit that doesn't have the directory, from inside the
100 directory (reordering nodes):
101 directory (reordering nodes):
102
103 A directory with the right pass exists at the end of the run, but it is a
104 different directory than the current one.
105
101 $ hg init hghistedit
106 $ hg init hghistedit
102 $ cd hghistedit
107 $ cd hghistedit
103 $ echo hi > r0
108 $ echo hi > r0
@@ -116,12 +121,28 b' directory (reordering nodes):'
116 > pick b550aa12d873 2 r2
121 > pick b550aa12d873 2 r2
117 > EOF
122 > EOF
118 $ cd $TESTTMP/hghistedit/somedir
123 $ cd $TESTTMP/hghistedit/somedir
119 $ hg --config extensions.histedit= histedit -q --commands ../histedit_commands
124 $ hg $DO_RM --config extensions.histedit= histedit -q --commands ../histedit_commands
120 current directory was removed
125 current directory was removed
121 (consider changing to repo root: $TESTTMP/hghistedit)
126 (consider changing to repo root: $TESTTMP/hghistedit)
127 $ ls -1 $TESTTMP/hghistedit/
128 histedit_commands
129 r0
130 r1
131 r2
132 somedir
133 $ pwd
134 $TESTTMP/hghistedit/somedir
135 $ ls -1 $TESTTMP/hghistedit/somedir
136 foo
137 $ ls -1
138
139 Get out of the doomed directory
140
141 $ cd $TESTTMP/hghistedit
142 $ hg files --rev . | grep somedir/
143 somedir/foo
122
144
123
145
124 $ cd $TESTTMP/hghistedit
125 $ cat > histedit_commands <<EOF
146 $ cat > histedit_commands <<EOF
126 > pick 89079fab8aee 0 r0
147 > pick 89079fab8aee 0 r0
127 > pick 7c7a22c6009f 3 migrating_revision
148 > pick 7c7a22c6009f 3 migrating_revision
General Comments 0
You need to be logged in to leave comments. Login now