Mercurial > hg-stable
comparison hgext/largefiles/overrides.py @ 18459:c9db897d5a43 stable
largefiles: fix largefiles+subrepo update (issue3752)
Override updaterepo() instead of individual methods that may not be called for
each subrepo. Add test.
Based on patch from Matt Harbison.
Changes the order of update-related messages (now largefiles comes before the
global status).
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 23 Jan 2013 00:51:53 +0100 |
parents | 03442135dff4 |
children | b7da9c042b9e |
comparison
equal
deleted
inserted
replaced
18458:9354a8c1bded | 18459:c9db897d5a43 |
---|---|
667 util.unlinkpath(repo.wjoin(standin)) | 667 util.unlinkpath(repo.wjoin(standin)) |
668 lfdirstate.write() | 668 lfdirstate.write() |
669 finally: | 669 finally: |
670 wlock.release() | 670 wlock.release() |
671 | 671 |
672 def hgupdate(orig, repo, node): | 672 def hgupdaterepo(orig, repo, node, overwrite): |
673 # Only call updatelfiles the standins that have changed to save time | 673 if not overwrite: |
674 oldstandins = lfutil.getstandinsstate(repo) | 674 # Only call updatelfiles on the standins that have changed to save time |
675 result = orig(repo, node) | 675 oldstandins = lfutil.getstandinsstate(repo) |
676 newstandins = lfutil.getstandinsstate(repo) | 676 |
677 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | 677 result = orig(repo, node, overwrite) |
678 lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, printmessage=True) | 678 |
679 return result | 679 filelist = None |
680 | 680 if not overwrite: |
681 def hgclean(orig, repo, node, show_stats=True): | 681 newstandins = lfutil.getstandinsstate(repo) |
682 result = orig(repo, node, show_stats) | 682 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
683 lfcommands.updatelfiles(repo.ui, repo) | 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 # Mark the repo as being in the middle of a merge, so that |
688 # updatelfiles() will know that it needs to trust the standins in | 688 # updatelfiles() will know that it needs to trust the standins in |