diff hgext/largefiles/overrides.py @ 18600:8ba520003ae0

largefiles: make caching largefiles message more explicit In some cases, caching largefiles may take a long time (if the user has pulled a lot of new heads). This patch makes it more clear what is happening, by showing the number of heads we are caching largefiles for.
author Na'Tosha Bard <natosha@unity3d.com>
date Sat, 09 Feb 2013 15:08:21 +0000
parents 2e3ec9e6ee6e
children bcf29565d89f
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sat Feb 09 15:25:46 2013 +0000
+++ b/hgext/largefiles/overrides.py	Sat Feb 09 15:08:21 2013 +0000
@@ -735,10 +735,11 @@
         # 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)