##// END OF EJS Templates
backup: fix issue when the backup end up in a different directory...
marmoute -
r51348:a445194f stable
parent child Browse files
Show More
@@ -414,6 +414,11 b' class transaction(util.transactional):'
414 414 if vfs.exists(file):
415 415 filepath = vfs.join(file)
416 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 422 util.copyfile(filepath, backuppath, hardlink=hardlink)
418 423 else:
419 424 backupfile = b''
@@ -1,6 +1,9 b''
1 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 7 Helper extension to intercept renames and kill process
5 8
6 9 $ cat > $TESTTMP/intercept_before_rename.py << EOF
@@ -80,6 +83,7 b' setup a repository for tests'
80 83 > file
81 84 > Directory_With,Special%Char/Complex_File.babar
82 85 > foo/bar/babar_celeste/foo
86 > 1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/f
83 87 > "
84 88 $ for f in $files; do
85 89 > mkdir -p `dirname $f`
@@ -179,7 +183,7 b' recover is rolling the split back, the f'
179 183 $ f -s .hg/store/data/file*
180 184 .hg/store/data/file.i: size=1174
181 185 $ hg tip
182 changeset: 1:272bd31be9b8
186 changeset: 1:cc8dfb126534
183 187 tag: tip
184 188 user: test
185 189 date: Thu Jan 01 00:00:00 1970 +0000
@@ -249,7 +253,7 b' recover is rolling the split back, the f'
249 253 $ f -s .hg/store/data/file*
250 254 .hg/store/data/file.i: size=1174
251 255 $ hg tip
252 changeset: 1:272bd31be9b8
256 changeset: 1:cc8dfb126534
253 257 tag: tip
254 258 user: test
255 259 date: Thu Jan 01 00:00:00 1970 +0000
@@ -313,7 +317,7 b' recover is rolling the split back, the f'
313 317 $ f -s .hg/store/data/file*
314 318 .hg/store/data/file.i: size=1174
315 319 $ hg tip
316 changeset: 1:272bd31be9b8
320 changeset: 1:cc8dfb126534
317 321 tag: tip
318 322 user: test
319 323 date: Thu Jan 01 00:00:00 1970 +0000
@@ -353,7 +357,7 b' The split was rollback'
353 357
354 358
355 359 $ hg tip
356 changeset: 1:272bd31be9b8
360 changeset: 1:cc8dfb126534
357 361 tag: tip
358 362 user: test
359 363 date: Thu Jan 01 00:00:00 1970 +0000
General Comments 0
You need to be logged in to leave comments. Login now