diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -735,10 +735,11 @@ def overridepull(orig, ui, repo, source= # will run into a problem later if we try to merge or rebase with one of # these heads, so cache the largefiles now directly into the system # cache. - ui.status(_("caching new largefiles\n")) numcached = 0 heads = lfutil.getcurrentheads(repo) newheads = set(heads).difference(set(oldheads)) + if len(newheads) > 0: + ui.status(_("caching largefiles for %s heads\n" % len(newheads))) for head in newheads: (cached, missing) = lfcommands.cachelfiles(ui, repo, head) numcached += len(cached) diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -883,7 +883,7 @@ downloaded from 'default' instead of 'de adding file changes added 6 changesets with 16 changes to 8 files (run 'hg update' to get a working copy) - caching new largefiles + caching largefiles for 1 heads 3 largefiles cached 3 additional largefiles cached $ cd .. @@ -974,7 +974,7 @@ The error messages go away if repo 'b' i adding file changes added 1 changesets with 2 changes to 2 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) - caching new largefiles + caching largefiles for 1 heads 0 largefiles cached $ hg rebase Invoking status precommit hook @@ -1273,7 +1273,7 @@ correctly. adding file changes added 2 changesets with 4 changes to 4 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) - caching new largefiles + caching largefiles for 1 heads 2 largefiles cached $ hg merge merging sub/large4