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