Show More
@@ -1,5 +1,13 b'' | |||||
1 | Tests for experimental.removeemptydirs |
|
1 | Tests for experimental.removeemptydirs | |
2 |
|
2 | |||
|
3 | $ cat >> pwd.py << EOF | |||
|
4 | > import os | |||
|
5 | > try: | |||
|
6 | > print(os.getcwd()) | |||
|
7 | > except OSError: | |||
|
8 | > print("<directory is no longer accessible>") | |||
|
9 | > EOF | |||
|
10 | ||||
3 | $ NO_RM=--config=experimental.removeemptydirs=0 |
|
11 | $ NO_RM=--config=experimental.removeemptydirs=0 | |
4 | $ DO_RM=--config=experimental.removeemptydirs=1 |
|
12 | $ DO_RM=--config=experimental.removeemptydirs=1 | |
5 | $ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi } |
|
13 | $ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi } | |
@@ -132,8 +140,15 b' Windows is not affected' | |||||
132 | r1 |
|
140 | r1 | |
133 | r2 |
|
141 | r2 | |
134 | somedir |
|
142 | somedir | |
135 | $ pwd |
|
143 | #if windows | |
|
144 | $ "$PYTHON" "$TESTTMP/pwd.py" | |||
136 | $TESTTMP/hghistedit/somedir |
|
145 | $TESTTMP/hghistedit/somedir | |
|
146 | #else | |||
|
147 | $ echo ${PWD} # no-pwd-check | |||
|
148 | $TESTTMP/hghistedit/somedir | |||
|
149 | $ "$PYTHON" "$TESTTMP/pwd.py" | |||
|
150 | <directory is no longer accessible> | |||
|
151 | #endif | |||
137 | $ ls -1 $TESTTMP/hghistedit/somedir |
|
152 | $ ls -1 $TESTTMP/hghistedit/somedir | |
138 | foo |
|
153 | foo | |
139 | $ ls -1 |
|
154 | $ ls -1 | |
@@ -142,6 +157,7 b' Windows is not affected' | |||||
142 | Get out of the doomed directory |
|
157 | Get out of the doomed directory | |
143 |
|
158 | |||
144 | $ cd $TESTTMP/hghistedit |
|
159 | $ cd $TESTTMP/hghistedit | |
|
160 | chdir: error retrieving current directory: getcwd: cannot access parent directories: $ENOENT$ (?) | |||
145 | $ hg files --rev . | grep somedir/ |
|
161 | $ hg files --rev . | grep somedir/ | |
146 | somedir/foo |
|
162 | somedir/foo | |
147 |
|
163 |
General Comments 0
You need to be logged in to leave comments.
Login now