Mercurial > hg-stable
diff 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 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Mon Jan 21 13:47:14 2013 -0200 +++ b/hgext/largefiles/overrides.py Wed Jan 23 00:51:53 2013 +0100 @@ -669,18 +669,18 @@ finally: wlock.release() -def hgupdate(orig, repo, node): - # Only call updatelfiles the standins that have changed to save time - oldstandins = lfutil.getstandinsstate(repo) - result = orig(repo, node) - newstandins = lfutil.getstandinsstate(repo) - filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) - lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, printmessage=True) - return result +def hgupdaterepo(orig, repo, node, overwrite): + if not overwrite: + # Only call updatelfiles on the standins that have changed to save time + oldstandins = lfutil.getstandinsstate(repo) -def hgclean(orig, repo, node, show_stats=True): - result = orig(repo, node, show_stats) - lfcommands.updatelfiles(repo.ui, repo) + result = orig(repo, node, overwrite) + + filelist = None + if not overwrite: + newstandins = lfutil.getstandinsstate(repo) + filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) + lfcommands.updatelfiles(repo.ui, repo, filelist=filelist) return result def hgmerge(orig, repo, node, force=None, remind=True):