diff hgext/largefiles/overrides.py @ 23275:fae708cb32d1

largefiles: avoid printing messages while transplanting by "_lfstatuswriters" Putting "lambda *msg, **opts: None" (= avoid printing messages always) into "_lfstatuswriters" while transplanting makes explicit passing "printmessage = False" for "updatelfiles()" useless. This patch also removes setting/unsetting "repo._istransplanting" in "overridetransplant", because there is no code path referring it.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 08 Nov 2014 00:48:41 +0900
parents 0ec2e124fcc0
children 4be754832829
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sat Nov 08 00:48:41 2014 +0900
+++ b/hgext/largefiles/overrides.py	Sat Nov 08 00:48:41 2014 +0900
@@ -1170,11 +1170,11 @@
 def overridetransplant(orig, ui, repo, *revs, **opts):
     resuming = opts.get('continue')
     repo._lfcommithooks.append(lfutil.automatedcommithook(resuming))
+    repo._lfstatuswriters.append(lambda *msg, **opts: None)
     try:
-        repo._istransplanting = True
         result = orig(ui, repo, *revs, **opts)
     finally:
-        repo._istransplanting = False
+        repo._lfstatuswriters.pop()
         repo._lfcommithooks.pop()
     return result
 
@@ -1277,12 +1277,7 @@
             newstandins = lfutil.getstandinsstate(repo)
             filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
 
-        printmessage = None
-        if getattr(repo, "_istransplanting", False):
-            # suppress status message while automated committing
-            printmessage = False
         lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
-                                printmessage=printmessage,
                                 normallookup=partial)
 
         return result