##// END OF EJS Templates
transaction: use a ".bck" extension for all backup file...
marmoute -
r51358:63dc24be default
parent child Browse files
Show More
@@ -409,7 +409,7 b' class transaction(util.transactional):'
409
409
410 vfs = self._vfsmap[location]
410 vfs = self._vfsmap[location]
411 dirname, filename = vfs.split(file)
411 dirname, filename = vfs.split(file)
412 backupfilename = b"%s.backup.%s" % (self._journal, filename)
412 backupfilename = b"%s.backup.%s.bck" % (self._journal, filename)
413 backupfile = vfs.reljoin(dirname, backupfilename)
413 backupfile = vfs.reljoin(dirname, backupfilename)
414 if vfs.exists(file):
414 if vfs.exists(file):
415 filepath = vfs.join(file)
415 filepath = vfs.join(file)
@@ -104,7 +104,7 b' Non store repo:'
104 .hg/phaseroots
104 .hg/phaseroots
105 .hg/requires
105 .hg/requires
106 .hg/undo
106 .hg/undo
107 .hg/undo.backup.branch
107 .hg/undo.backup.branch.bck
108 .hg/undo.backupfiles
108 .hg/undo.backupfiles
109 .hg/undo.desc
109 .hg/undo.desc
110 .hg/wcache
110 .hg/wcache
@@ -144,7 +144,7 b' Non fncache repo:'
144 .hg/store/requires
144 .hg/store/requires
145 .hg/store/undo
145 .hg/store/undo
146 .hg/store/undo.backupfiles
146 .hg/store/undo.backupfiles
147 .hg/undo.backup.branch
147 .hg/undo.backup.branch.bck
148 .hg/undo.desc
148 .hg/undo.desc
149 .hg/wcache
149 .hg/wcache
150 .hg/wcache/checkisexec (execbit !)
150 .hg/wcache/checkisexec (execbit !)
@@ -52,7 +52,7 b' Prepare repo r1:'
52 1 r1/.hg/store/phaseroots
52 1 r1/.hg/store/phaseroots
53 1 r1/.hg/store/requires
53 1 r1/.hg/store/requires
54 1 r1/.hg/store/undo
54 1 r1/.hg/store/undo
55 1 r1/.hg/store/undo.backup.fncache (repofncache !)
55 1 r1/.hg/store/undo.backup.fncache.bck (repofncache !)
56 1 r1/.hg/store/undo.backupfiles
56 1 r1/.hg/store/undo.backupfiles
57
57
58
58
@@ -93,7 +93,7 b' Repos r1 and r2 should now contain hardl'
93 1 r1/.hg/store/phaseroots
93 1 r1/.hg/store/phaseroots
94 1 r1/.hg/store/requires
94 1 r1/.hg/store/requires
95 1 r1/.hg/store/undo
95 1 r1/.hg/store/undo
96 1 r1/.hg/store/undo.backup.fncache (repofncache !)
96 1 r1/.hg/store/undo.backup.fncache.bck (repofncache !)
97 1 r1/.hg/store/undo.backupfiles
97 1 r1/.hg/store/undo.backupfiles
98
98
99 $ nlinksdir r2/.hg/store
99 $ nlinksdir r2/.hg/store
@@ -252,8 +252,8 b' r4 has hardlinks in the working dir (not'
252 2 r4/.hg/store/requires
252 2 r4/.hg/store/requires
253 2 r4/.hg/store/undo
253 2 r4/.hg/store/undo
254 2 r4/.hg/store/undo.backupfiles
254 2 r4/.hg/store/undo.backupfiles
255 [24] r4/.hg/undo.backup.branch (re)
255 [24] r4/.hg/undo.backup.branch.bck (re)
256 2 r4/\.hg/undo\.backup\.dirstate (re)
256 2 r4/\.hg/undo\.backup\.dirstate.bck (re)
257 2 r4/.hg/undo.desc
257 2 r4/.hg/undo.desc
258 2 r4/.hg/wcache/checkisexec (execbit !)
258 2 r4/.hg/wcache/checkisexec (execbit !)
259 2 r4/.hg/wcache/checklink-target (symlink !)
259 2 r4/.hg/wcache/checklink-target (symlink !)
@@ -266,9 +266,9 b' r4 has hardlinks in the working dir (not'
266
266
267 Update back to revision 12 in r4 should break hardlink of file f1 and f3:
267 Update back to revision 12 in r4 should break hardlink of file f1 and f3:
268 #if hardlink-whitelisted
268 #if hardlink-whitelisted
269 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/dirstate
269 $ nlinksdir r4/.hg/undo.backup.dirstate.bck r4/.hg/dirstate
270 2 r4/.hg/dirstate
270 2 r4/.hg/dirstate
271 2 r4/.hg/undo.backup.dirstate
271 2 r4/.hg/undo.backup.dirstate.bck
272 #endif
272 #endif
273
273
274
274
@@ -305,8 +305,8 b' Update back to revision 12 in r4 should '
305 2 r4/.hg/store/requires
305 2 r4/.hg/store/requires
306 2 r4/.hg/store/undo
306 2 r4/.hg/store/undo
307 2 r4/.hg/store/undo.backupfiles
307 2 r4/.hg/store/undo.backupfiles
308 [23] r4/.hg/undo.backup.branch (re)
308 [23] r4/.hg/undo.backup.branch.bck (re)
309 2 r4/\.hg/undo\.backup\.dirstate (re)
309 2 r4/\.hg/undo\.backup\.dirstate.bck (re)
310 2 r4/.hg/undo.desc
310 2 r4/.hg/undo.desc
311 2 r4/.hg/wcache/checkisexec (execbit !)
311 2 r4/.hg/wcache/checkisexec (execbit !)
312 2 r4/.hg/wcache/checklink-target (symlink !)
312 2 r4/.hg/wcache/checklink-target (symlink !)
@@ -319,9 +319,9 b' Update back to revision 12 in r4 should '
319 2 r4/f3 (no-execbit !)
319 2 r4/f3 (no-execbit !)
320
320
321 #if hardlink-whitelisted
321 #if hardlink-whitelisted
322 $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/dirstate
322 $ nlinksdir r4/.hg/undo.backup.dirstate.bck r4/.hg/dirstate
323 1 r4/.hg/dirstate
323 1 r4/.hg/dirstate
324 2 r4/.hg/undo.backup.dirstate
324 2 r4/.hg/undo.backup.dirstate.bck
325 #endif
325 #endif
326
326
327 Test hardlinking outside hg:
327 Test hardlinking outside hg:
@@ -465,7 +465,7 b' more there after'
465 phaseroots
465 phaseroots
466 requires
466 requires
467 undo
467 undo
468 undo.backup.fncache (repofncache !)
468 undo.backup.fncache.bck (repofncache !)
469 undo.backupfiles
469 undo.backupfiles
470
470
471
471
@@ -95,7 +95,7 b' new directories are setgid'
95 00600 ./.hg/store/requires
95 00600 ./.hg/store/requires
96 00660 ./.hg/store/undo
96 00660 ./.hg/store/undo
97 00660 ./.hg/store/undo.backupfiles
97 00660 ./.hg/store/undo.backupfiles
98 00660 ./.hg/undo.backup.branch
98 00660 ./.hg/undo.backup.branch.bck
99 00660 ./.hg/undo.desc
99 00660 ./.hg/undo.desc
100 00770 ./.hg/wcache/
100 00770 ./.hg/wcache/
101 00711 ./.hg/wcache/checkisexec
101 00711 ./.hg/wcache/checkisexec
@@ -153,7 +153,7 b' group can still write everything'
153 00660 ../push/.hg/store/requires
153 00660 ../push/.hg/store/requires
154 00660 ../push/.hg/store/undo
154 00660 ../push/.hg/store/undo
155 00660 ../push/.hg/store/undo.backupfiles
155 00660 ../push/.hg/store/undo.backupfiles
156 00660 ../push/.hg/undo.backup.branch
156 00660 ../push/.hg/undo.backup.branch.bck
157 00660 ../push/.hg/undo.desc
157 00660 ../push/.hg/undo.desc
158 00770 ../push/.hg/wcache/
158 00770 ../push/.hg/wcache/
159
159
@@ -184,7 +184,7 b' conditional above.'
184
184
185 $ find share_dst/.hg/largefiles/* | sort
185 $ find share_dst/.hg/largefiles/* | sort
186 share_dst/.hg/largefiles/dirstate
186 share_dst/.hg/largefiles/dirstate
187 share_dst/.hg/largefiles/undo.backup.dirstate
187 share_dst/.hg/largefiles/undo.backup.dirstate.bck
188
188
189 $ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
189 $ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
190 src/.hg/largefiles/dirstate
190 src/.hg/largefiles/dirstate
@@ -1193,8 +1193,6 b' Performe the mix of clone and full refre'
1193 (note: the stream clone code wronly pick the `undo.` files)
1193 (note: the stream clone code wronly pick the `undo.` files)
1194
1194
1195 $ cat clone-output-2
1195 $ cat clone-output-2
1196 adding [s] undo.backup.00manifest.n (62 bytes) (known-bad-output !)
1197 adding [s] undo.backup.00changelog.n (62 bytes) (known-bad-output !)
1198 adding [s] 00manifest.n (62 bytes)
1196 adding [s] 00manifest.n (62 bytes)
1199 adding [s] 00manifest-*.nd (118 KB) (glob)
1197 adding [s] 00manifest-*.nd (118 KB) (glob)
1200 adding [s] 00changelog.n (62 bytes)
1198 adding [s] 00changelog.n (62 bytes)
@@ -392,7 +392,6 b' New operations are blocked with the corr'
392 .hg/dirstate
392 .hg/dirstate
393 .hg/merge/state
393 .hg/merge/state
394 .hg/rebasestate
394 .hg/rebasestate
395 .hg/undo.backup.dirstate
396 .hg/updatestate
395 .hg/updatestate
397
396
398 $ hg rebase -s 3 -d tip
397 $ hg rebase -s 3 -d tip
@@ -72,7 +72,7 b' working dir unaffected by rollback: do n'
72 $ hg update bar
72 $ hg update bar
73 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
73 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
74 (activating bookmark bar)
74 (activating bookmark bar)
75 $ cat .hg/undo.backup.branch
75 $ cat .hg/undo.backup.branch.bck
76 test
76 test
77 $ hg log -G --template '{rev} [{branch}] ({bookmarks}) {desc|firstline}\n'
77 $ hg log -G --template '{rev} [{branch}] ({bookmarks}) {desc|firstline}\n'
78 o 2 [test] (foo) add b
78 o 2 [test] (foo) add b
@@ -172,7 +172,7 b' A "temporary file" entry exist for the s'
172 data/file.i 1174
172 data/file.i 1174
173 data/file.d 0
173 data/file.d 0
174 $ cat .hg/store/journal.backupfiles | tr -s '\000' ' ' | tr -s '\00' ' '| grep data/file
174 $ cat .hg/store/journal.backupfiles | tr -s '\000' ' ' | tr -s '\00' ' '| grep data/file
175 data/file.i data/journal.backup.file.i 0
175 data/file.i data/journal.backup.file.i.bck 0
176 data/file.i.s 0
176 data/file.i.s 0
177
177
178 recover is rolling the split back, the fncache is still valid
178 recover is rolling the split back, the fncache is still valid
@@ -866,7 +866,7 b' old store should be backed up'
866 phaseroots
866 phaseroots
867 requires
867 requires
868 undo
868 undo
869 undo.backup.fncache
869 undo.backup.fncache.bck
870 undo.backupfiles
870 undo.backupfiles
871
871
872 unless --no-backup is passed
872 unless --no-backup is passed
General Comments 0
You need to be logged in to leave comments. Login now