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