##// END OF EJS Templates
largefiles: update should only create a .orig backup of a largefile once...
Mads Kiilerich -
r21083:20b0c49c default
parent child Browse files
Show More
@@ -447,6 +447,7 b' def updatelfiles(ui, repo, filelist=None'
447 447 if (os.path.exists(absstandin + '.orig') and
448 448 os.path.exists(abslfile)):
449 449 shutil.copyfile(abslfile, abslfile + '.orig')
450 util.unlinkpath(absstandin + '.orig')
450 451 expecthash = lfutil.readstandin(repo, lfile)
451 452 if (expecthash != '' and
452 453 (not os.path.exists(abslfile) or
@@ -1111,6 +1111,12 b' Rollback on largefiles.'
1111 1111
1112 1112 $ echo mistake > sub2/large7
1113 1113 $ hg revert sub2/large7
1114 $ cat sub2/large7
1115 large7
1116 $ cat sub2/large7.orig
1117 mistake
1118 $ test ! -f .hglf/sub2/large7.orig
1119
1114 1120 $ hg -q update --clean -r null
1115 1121 $ hg update --clean
1116 1122 getting changed largefiles
@@ -1128,18 +1134,16 b' Rollback on largefiles.'
1128 1134 large7
1129 1135 $ cat sub2/large7.orig
1130 1136 mistake
1131 $ cat .hglf/sub2/large7.orig
1132 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31
1137 $ test ! -f .hglf/sub2/large7.orig
1133 1138
1134 demonstrate misfeature: .orig file is overwritten on every update -C,
1135 also when clean:
1139 verify that largefile .orig file no longer is overwritten on every update -C:
1136 1140 $ hg update --clean
1137 1141 getting changed largefiles
1138 1142 0 largefiles updated, 0 removed
1139 1143 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1140 1144 $ cat sub2/large7.orig
1141 large7
1142 $ rm sub2/large7.orig .hglf/sub2/large7.orig
1145 mistake
1146 $ rm sub2/large7.orig
1143 1147
1144 1148 Now "update check" is happy.
1145 1149 $ hg update --check 8
General Comments 0
You need to be logged in to leave comments. Login now