Show More
@@ -342,8 +342,11 b' def splitstandin(filename):' | |||||
342 | else: |
|
342 | else: | |
343 | return None |
|
343 | return None | |
344 |
|
344 | |||
345 | def updatestandin(repo, standin): |
|
345 | def updatestandin(repo, lfile, standin): | |
346 | lfile = splitstandin(standin) |
|
346 | """Re-calculate hash value of lfile and write it into standin | |
|
347 | ||||
|
348 | This assumes that "lfutil.standin(lfile) == standin", for efficiency. | |||
|
349 | """ | |||
347 | file = repo.wjoin(lfile) |
|
350 | file = repo.wjoin(lfile) | |
348 | if repo.wvfs.exists(lfile): |
|
351 | if repo.wvfs.exists(lfile): | |
349 | hash = hashfile(file) |
|
352 | hash = hashfile(file) | |
@@ -560,7 +563,7 b' def updatestandinsbymatch(repo, match):' | |||||
560 | # performed and the working copy is not updated |
|
563 | # performed and the working copy is not updated | |
561 | # yet. |
|
564 | # yet. | |
562 | if repo.wvfs.exists(lfile): |
|
565 | if repo.wvfs.exists(lfile): | |
563 | updatestandin(repo, fstandin) |
|
566 | updatestandin(repo, lfile, fstandin) | |
564 |
|
567 | |||
565 | return match |
|
568 | return match | |
566 |
|
569 | |||
@@ -586,7 +589,7 b' def updatestandinsbymatch(repo, match):' | |||||
586 | for fstandin in standins: |
|
589 | for fstandin in standins: | |
587 | lfile = splitstandin(fstandin) |
|
590 | lfile = splitstandin(fstandin) | |
588 | if lfdirstate[lfile] != 'r': |
|
591 | if lfdirstate[lfile] != 'r': | |
589 | updatestandin(repo, fstandin) |
|
592 | updatestandin(repo, lfile, fstandin) | |
590 |
|
593 | |||
591 | # Cook up a new matcher that only matches regular files or |
|
594 | # Cook up a new matcher that only matches regular files or | |
592 | # standins corresponding to the big files requested by the |
|
595 | # standins corresponding to the big files requested by the |
@@ -736,7 +736,7 b' def overriderevert(orig, ui, repo, ctx, ' | |||||
736 | s = lfutil.lfdirstatestatus(lfdirstate, repo) |
|
736 | s = lfutil.lfdirstatestatus(lfdirstate, repo) | |
737 | lfdirstate.write() |
|
737 | lfdirstate.write() | |
738 | for lfile in s.modified: |
|
738 | for lfile in s.modified: | |
739 | lfutil.updatestandin(repo, lfutil.standin(lfile)) |
|
739 | lfutil.updatestandin(repo, lfile, lfutil.standin(lfile)) | |
740 | for lfile in s.deleted: |
|
740 | for lfile in s.deleted: | |
741 | fstandin = lfutil.standin(lfile) |
|
741 | fstandin = lfutil.standin(lfile) | |
742 | if (repo.wvfs.exists(fstandin)): |
|
742 | if (repo.wvfs.exists(fstandin)): | |
@@ -1417,7 +1417,7 b' def mergeupdate(orig, repo, node, branch' | |||||
1417 | # in this case, content of standin file is meaningless |
|
1417 | # in this case, content of standin file is meaningless | |
1418 | # (in dctx, lfile is unknown, or normal file) |
|
1418 | # (in dctx, lfile is unknown, or normal file) | |
1419 | continue |
|
1419 | continue | |
1420 | lfutil.updatestandin(repo, fstandin) |
|
1420 | lfutil.updatestandin(repo, lfile, fstandin) | |
1421 | # mark all clean largefiles as dirty, just in case the update gets |
|
1421 | # mark all clean largefiles as dirty, just in case the update gets | |
1422 | # interrupted before largefiles and lfdirstate are synchronized |
|
1422 | # interrupted before largefiles and lfdirstate are synchronized | |
1423 | for lfile in oldclean: |
|
1423 | for lfile in oldclean: |
General Comments 0
You need to be logged in to leave comments.
Login now