Show More
@@ -457,3 +457,11 b' def getstandinsstate(repo):' | |||||
457 | lfile = splitstandin(standin) |
|
457 | lfile = splitstandin(standin) | |
458 | standins.append((lfile, readstandin(repo, lfile))) |
|
458 | standins.append((lfile, readstandin(repo, lfile))) | |
459 | return standins |
|
459 | return standins | |
|
460 | ||||
|
461 | def getlfilestoupdate(oldstandins, newstandins): | |||
|
462 | changedstandins = set(oldstandins).symmetric_difference(set(newstandins)) | |||
|
463 | filelist = [] | |||
|
464 | for f in changedstandins: | |||
|
465 | if f[0] not in filelist: | |||
|
466 | filelist.append(f[0]) | |||
|
467 | return filelist |
@@ -602,19 +602,11 b' def override_revert(orig, ui, repo, *pat' | |||||
602 | wlock.release() |
|
602 | wlock.release() | |
603 |
|
603 | |||
604 | def hg_update(orig, repo, node): |
|
604 | def hg_update(orig, repo, node): | |
605 | # In order to not waste a lot of extra time during the update largefiles |
|
605 | # Only call updatelfiles the standins that have changed to save time | |
606 | # step, we keep track of the state of the standins before and after we |
|
|||
607 | # call the original update function, and only update the standins that |
|
|||
608 | # have changed in the hg.update() call |
|
|||
609 | oldstandins = lfutil.getstandinsstate(repo) |
|
606 | oldstandins = lfutil.getstandinsstate(repo) | |
610 | result = orig(repo, node) |
|
607 | result = orig(repo, node) | |
611 | newstandins = lfutil.getstandinsstate(repo) |
|
608 | newstandins = lfutil.getstandinsstate(repo) | |
612 | tobeupdated = set(oldstandins).symmetric_difference(set(newstandins)) |
|
609 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | |
613 | filelist = [] |
|
|||
614 | for f in tobeupdated: |
|
|||
615 | if f[0] not in filelist: |
|
|||
616 | filelist.append(f[0]) |
|
|||
617 |
|
||||
618 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, printmessage=True) |
|
610 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, printmessage=True) | |
619 | return result |
|
611 | return result | |
620 |
|
612 |
General Comments 0
You need to be logged in to leave comments.
Login now