diff hgext/largefiles/overrides.py @ 23189:fb139f5553d6

largefiles: get function to write status messages via "getstatuswriter()" This patch makes "updatelfiles()" get appropriate function to write largefiles specific status messages via "getstatuswriter()". This patch introduces None as "print messages if needed", because True (forcibly writing) and False (forcibly ignoring) are already used for "printmessage" of "updatelfiles". Subsequent patch will move "avoid printing messages only while automated committing" decision from caller of "updatelfiles()" into "getstatuswriter()".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 05 Nov 2014 23:24:47 +0900
parents f726b05ecfe6
children 383ff455cab8
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Wed Nov 05 23:24:47 2014 +0900
+++ b/hgext/largefiles/overrides.py	Wed Nov 05 23:24:47 2014 +0900
@@ -1279,9 +1279,11 @@
             newstandins = lfutil.getstandinsstate(repo)
             filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
 
-        # suppress status message while automated committing
-        printmessage = not (getattr(repo, "_isrebasing", False) or
-                            getattr(repo, "_istransplanting", False))
+        printmessage = None
+        if (getattr(repo, "_isrebasing", False) or
+            getattr(repo, "_istransplanting", False)):
+            # suppress status message while automated committing
+            printmessage = False
         lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
                                 printmessage=printmessage,
                                 normallookup=partial)