Show More
@@ -455,6 +455,7 b' def updatelfiles(ui, repo, filelist=None' | |||
|
455 | 455 | lfiles = [f for f in lfiles if f in filelist] |
|
456 | 456 | |
|
457 | 457 | update = {} |
|
458 | dropped = set() | |
|
458 | 459 | updated, removed = 0, 0 |
|
459 | 460 | wvfs = repo.wvfs |
|
460 | 461 | wctx = repo[None] |
@@ -476,7 +477,11 b' def updatelfiles(ui, repo, filelist=None' | |||
|
476 | 477 | expecthash = lfutil.readasstandin(wctx[relstandin]) |
|
477 | 478 | if expecthash != '': |
|
478 | 479 | if lfile not in wctx: # not switched to normal file |
|
479 | wvfs.unlinkpath(rellfile, ignoremissing=True) | |
|
480 | if repo.dirstate[relstandin] != '?': | |
|
481 | wvfs.unlinkpath(rellfile, ignoremissing=True) | |
|
482 | else: | |
|
483 | dropped.add(rellfile) | |
|
484 | ||
|
480 | 485 | # use normallookup() to allocate an entry in largefiles |
|
481 | 486 | # dirstate to prevent lfilesrepo.status() from reporting |
|
482 | 487 | # missing files as removed. |
@@ -496,6 +501,15 b' def updatelfiles(ui, repo, filelist=None' | |||
|
496 | 501 | lfdirstate.write() |
|
497 | 502 | |
|
498 | 503 | if lfiles: |
|
504 | lfiles = [f for f in lfiles if f not in dropped] | |
|
505 | ||
|
506 | for f in dropped: | |
|
507 | repo.wvfs.unlinkpath(lfutil.standin(f)) | |
|
508 | ||
|
509 | # This needs to happen for dropped files, otherwise they stay in | |
|
510 | # the M state. | |
|
511 | lfutil.synclfdirstate(repo, lfdirstate, f, normallookup) | |
|
512 | ||
|
499 | 513 | statuswriter(_('getting changed largefiles\n')) |
|
500 | 514 | cachelfiles(ui, repo, None, lfiles) |
|
501 | 515 |
@@ -1148,20 +1148,18 b' Move (and then undo) a directory move wi' | |||
|
1148 | 1148 | ? dir/subdir2/large.bin |
|
1149 | 1149 | ? large.orig |
|
1150 | 1150 | |
|
1151 |
|
|
|
1151 | The content of the forgotten file shouldn't be clobbered | |
|
1152 | 1152 | |
|
1153 | 1153 | $ cat dir/subdir2/large.bin |
|
1154 | large2 | |
|
1154 | modified | |
|
1155 | 1155 | |
|
1156 |
|
|
|
1156 | The standin for subdir2 should be deleted, not just dropped | |
|
1157 | 1157 | |
|
1158 | 1158 | $ listtree .hglf dir* large* |
|
1159 | 1159 | .hglf/ |
|
1160 | 1160 | .hglf/dir/ |
|
1161 | 1161 | .hglf/dir/subdir/ |
|
1162 | 1162 | .hglf/dir/subdir/large.bin |
|
1163 | .hglf/dir/subdir2/ | |
|
1164 | .hglf/dir/subdir2/large.bin | |
|
1165 | 1163 | .hglf/large |
|
1166 | 1164 | dir/ |
|
1167 | 1165 | dir/subdir/ |
@@ -1173,13 +1171,13 b' BUG: the standin for subdir2 should be d' | |||
|
1173 | 1171 | |
|
1174 | 1172 | $ rm -r dir/subdir2 |
|
1175 | 1173 | |
|
1176 |
|
|
|
1177 |
exist |
|
|
1174 | 'subdir' should not be in the destination. It would be if the subdir2 directory | |
|
1175 | existed under .hglf/. | |
|
1178 | 1176 | $ hg mv dir/subdir dir/subdir2 |
|
1179 |
moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/ |
|
|
1177 | moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/large.bin (glob) | |
|
1180 | 1178 | |
|
1181 | 1179 | $ hg status -C |
|
1182 |
A dir/subdir2/ |
|
|
1180 | A dir/subdir2/large.bin | |
|
1183 | 1181 | dir/subdir/large.bin |
|
1184 | 1182 | R dir/subdir/large.bin |
|
1185 | 1183 | ? large.orig |
@@ -1189,13 +1187,10 b' existing under .hglf/.' | |||
|
1189 | 1187 | .hglf/dir/ |
|
1190 | 1188 | .hglf/dir/subdir2/ |
|
1191 | 1189 | .hglf/dir/subdir2/large.bin |
|
1192 | .hglf/dir/subdir2/subdir/ | |
|
1193 | .hglf/dir/subdir2/subdir/large.bin | |
|
1194 | 1190 | .hglf/large |
|
1195 | 1191 | dir/ |
|
1196 | 1192 | dir/subdir2/ |
|
1197 |
dir/subdir2/ |
|
|
1198 | dir/subdir2/subdir/large.bin | |
|
1193 | dir/subdir2/large.bin | |
|
1199 | 1194 | large |
|
1200 | 1195 | large.orig |
|
1201 | 1196 | |
@@ -1236,9 +1231,6 b' Start from scratch, and rename something' | |||
|
1236 | 1231 | .hglf/dir/ |
|
1237 | 1232 | .hglf/dir/subdir/ |
|
1238 | 1233 | .hglf/dir/subdir/large.bin |
|
1239 | .hglf/dir2/ | |
|
1240 | .hglf/dir2/subdir/ | |
|
1241 | .hglf/dir2/subdir/large.bin | |
|
1242 | 1234 | .hglf/large |
|
1243 | 1235 | dir/ |
|
1244 | 1236 | dir/subdir/ |
General Comments 0
You need to be logged in to leave comments.
Login now