Show More
@@ -414,6 +414,11 b' class transaction(util.transactional):' | |||||
414 | if vfs.exists(file): |
|
414 | if vfs.exists(file): | |
415 | filepath = vfs.join(file) |
|
415 | filepath = vfs.join(file) | |
416 | backuppath = vfs.join(backupfile) |
|
416 | backuppath = vfs.join(backupfile) | |
|
417 | # store encoding may result in different directory here. | |||
|
418 | # so we have to ensure the destination directory exist | |||
|
419 | final_dir_name = os.path.dirname(backuppath) | |||
|
420 | util.makedirs(final_dir_name, mode=vfs.createmode, notindexed=True) | |||
|
421 | # then we can copy the backup | |||
417 | util.copyfile(filepath, backuppath, hardlink=hardlink) |
|
422 | util.copyfile(filepath, backuppath, hardlink=hardlink) | |
418 | else: |
|
423 | else: | |
419 | backupfile = b'' |
|
424 | backupfile = b'' |
@@ -1,6 +1,9 b'' | |||||
1 | Test correctness of revlog inline -> non-inline transition |
|
1 | Test correctness of revlog inline -> non-inline transition | |
2 | ---------------------------------------------------------- |
|
2 | ---------------------------------------------------------- | |
3 |
|
3 | |||
|
4 | We test various file length and naming pattern as this created issue in the | |||
|
5 | past. | |||
|
6 | ||||
4 | Helper extension to intercept renames and kill process |
|
7 | Helper extension to intercept renames and kill process | |
5 |
|
8 | |||
6 | $ cat > $TESTTMP/intercept_before_rename.py << EOF |
|
9 | $ cat > $TESTTMP/intercept_before_rename.py << EOF | |
@@ -80,6 +83,7 b' setup a repository for tests' | |||||
80 | > file |
|
83 | > file | |
81 | > Directory_With,Special%Char/Complex_File.babar |
|
84 | > Directory_With,Special%Char/Complex_File.babar | |
82 | > foo/bar/babar_celeste/foo |
|
85 | > foo/bar/babar_celeste/foo | |
|
86 | > 1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/f | |||
83 | > " |
|
87 | > " | |
84 | $ for f in $files; do |
|
88 | $ for f in $files; do | |
85 | > mkdir -p `dirname $f` |
|
89 | > mkdir -p `dirname $f` | |
@@ -179,7 +183,7 b' recover is rolling the split back, the f' | |||||
179 | $ f -s .hg/store/data/file* |
|
183 | $ f -s .hg/store/data/file* | |
180 | .hg/store/data/file.i: size=1174 |
|
184 | .hg/store/data/file.i: size=1174 | |
181 | $ hg tip |
|
185 | $ hg tip | |
182 |
changeset: 1: |
|
186 | changeset: 1:cc8dfb126534 | |
183 | tag: tip |
|
187 | tag: tip | |
184 | user: test |
|
188 | user: test | |
185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
189 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -249,7 +253,7 b' recover is rolling the split back, the f' | |||||
249 | $ f -s .hg/store/data/file* |
|
253 | $ f -s .hg/store/data/file* | |
250 | .hg/store/data/file.i: size=1174 |
|
254 | .hg/store/data/file.i: size=1174 | |
251 | $ hg tip |
|
255 | $ hg tip | |
252 |
changeset: 1: |
|
256 | changeset: 1:cc8dfb126534 | |
253 | tag: tip |
|
257 | tag: tip | |
254 | user: test |
|
258 | user: test | |
255 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
259 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -313,7 +317,7 b' recover is rolling the split back, the f' | |||||
313 | $ f -s .hg/store/data/file* |
|
317 | $ f -s .hg/store/data/file* | |
314 | .hg/store/data/file.i: size=1174 |
|
318 | .hg/store/data/file.i: size=1174 | |
315 | $ hg tip |
|
319 | $ hg tip | |
316 |
changeset: 1: |
|
320 | changeset: 1:cc8dfb126534 | |
317 | tag: tip |
|
321 | tag: tip | |
318 | user: test |
|
322 | user: test | |
319 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
323 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -353,7 +357,7 b' The split was rollback' | |||||
353 |
|
357 | |||
354 |
|
358 | |||
355 | $ hg tip |
|
359 | $ hg tip | |
356 |
changeset: 1: |
|
360 | changeset: 1:cc8dfb126534 | |
357 | tag: tip |
|
361 | tag: tip | |
358 | user: test |
|
362 | user: test | |
359 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
363 | date: Thu Jan 01 00:00:00 1970 +0000 |
General Comments 0
You need to be logged in to leave comments.
Login now