Patchwork [1,of,4,stable] largefiles: cleanup of printmessage handling - the printed flag was redundant

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 7, 2013, 12:59 a.m.
Message ID <5446efa8ad832a7f724d.1383785943@localhost.localdomain>
Download mbox | patch
Permalink /patch/2865/
State Accepted
Commit 750d04e747aaf49d70232c06ada5f1034c870d70
Headers show

Comments

Mads Kiilerich - Nov. 7, 2013, 12:59 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1383785279 -3600
#      Thu Nov 07 01:47:59 2013 +0100
# Branch stable
# Node ID 5446efa8ad832a7f724d0db66ffc068801dc3fd2
# Parent  ba6486076429e5c20d910b8a5d4f8acf1e9dc1b1
largefiles: cleanup of printmessage handling - the printed flag was redundant

Patch

diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -438,10 +438,8 @@  def updatelfiles(ui, repo, filelist=None
         if filelist is not None:
             lfiles = [f for f in lfiles if f in filelist]
 
-        printed = False
         if printmessage and lfiles:
             ui.status(_('getting changed largefiles\n'))
-            printed = True
             cachelfiles(ui, repo, None, lfiles)
 
         updated, removed = 0, 0
@@ -452,12 +450,9 @@  def updatelfiles(ui, repo, filelist=None
                     updated += i
                 else:
                     removed -= i
-            if printmessage and (removed or updated) and not printed:
-                ui.status(_('getting changed largefiles\n'))
-                printed = True
 
         lfdirstate.write()
-        if printed and printmessage:
+        if printmessage and lfiles:
             ui.status(_('%d largefiles updated, %d removed\n') % (updated,
                 removed))
     finally: