Mercurial > hg
comparison hgext/largefiles/overrides.py @ 18728:1e636f7b1cfe stable
largefiles: simplify cachelfiles - don't spend a lot of time checking hashes
cachelfiles jumped through loops to handle merges and modified files ... but it
did apparently no longer have a valid reason to do so. It should just always
make sure that the largefiles referenced from the standins are present - no
matter which actual largefile is stored in the working directory. If there is
no standin then there is nothing to fetch.
The old code usually verified the hash of all largefiles every time this
function was invoked - for examply by 'update'.
This change makes a trivial noop update 5-10 seconds faster on our repo (with
the other 50% spent doing another unnecessary hashing of all largefiles).
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Feb 2013 13:45:18 +0100 |
parents | 2dc7f63181b9 |
children | c2d079387b2c |
comparison
equal
deleted
inserted
replaced
18727:4846f2115927 | 18728:1e636f7b1cfe |
---|---|
682 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | 682 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
683 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist) | 683 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist) |
684 return result | 684 return result |
685 | 685 |
686 def hgmerge(orig, repo, node, force=None, remind=True): | 686 def hgmerge(orig, repo, node, force=None, remind=True): |
687 # Mark the repo as being in the middle of a merge, so that | 687 result = orig(repo, node, force, remind) |
688 # updatelfiles() will know that it needs to trust the standins in | 688 lfcommands.updatelfiles(repo.ui, repo) |
689 # the working copy, not in the standins in the current node | |
690 repo._ismerging = True | |
691 try: | |
692 result = orig(repo, node, force, remind) | |
693 lfcommands.updatelfiles(repo.ui, repo) | |
694 finally: | |
695 repo._ismerging = False | |
696 return result | 689 return result |
697 | 690 |
698 # When we rebase a repository with remotely changed largefiles, we need to | 691 # When we rebase a repository with remotely changed largefiles, we need to |
699 # take some extra care so that the largefiles are correctly updated in the | 692 # take some extra care so that the largefiles are correctly updated in the |
700 # working copy | 693 # working copy |