##// 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 if (os.path.exists(absstandin + '.orig') and
447 if (os.path.exists(absstandin + '.orig') and
448 os.path.exists(abslfile)):
448 os.path.exists(abslfile)):
449 shutil.copyfile(abslfile, abslfile + '.orig')
449 shutil.copyfile(abslfile, abslfile + '.orig')
450 util.unlinkpath(absstandin + '.orig')
450 expecthash = lfutil.readstandin(repo, lfile)
451 expecthash = lfutil.readstandin(repo, lfile)
451 if (expecthash != '' and
452 if (expecthash != '' and
452 (not os.path.exists(abslfile) or
453 (not os.path.exists(abslfile) or
@@ -1111,6 +1111,12 b' Rollback on largefiles.'
1111
1111
1112 $ echo mistake > sub2/large7
1112 $ echo mistake > sub2/large7
1113 $ hg revert sub2/large7
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 $ hg -q update --clean -r null
1120 $ hg -q update --clean -r null
1115 $ hg update --clean
1121 $ hg update --clean
1116 getting changed largefiles
1122 getting changed largefiles
@@ -1128,18 +1134,16 b' Rollback on largefiles.'
1128 large7
1134 large7
1129 $ cat sub2/large7.orig
1135 $ cat sub2/large7.orig
1130 mistake
1136 mistake
1131 $ cat .hglf/sub2/large7.orig
1137 $ test ! -f .hglf/sub2/large7.orig
1132 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31
1133
1138
1134 demonstrate misfeature: .orig file is overwritten on every update -C,
1139 verify that largefile .orig file no longer is overwritten on every update -C:
1135 also when clean:
1136 $ hg update --clean
1140 $ hg update --clean
1137 getting changed largefiles
1141 getting changed largefiles
1138 0 largefiles updated, 0 removed
1142 0 largefiles updated, 0 removed
1139 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1143 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1140 $ cat sub2/large7.orig
1144 $ cat sub2/large7.orig
1141 large7
1145 mistake
1142 $ rm sub2/large7.orig .hglf/sub2/large7.orig
1146 $ rm sub2/large7.orig
1143
1147
1144 Now "update check" is happy.
1148 Now "update check" is happy.
1145 $ hg update --check 8
1149 $ hg update --check 8
General Comments 0
You need to be logged in to leave comments. Login now