[PATCH 3 of 8] hg: add quietempty flag to _showstats

timeless timeless at mozdev.org
Mon Dec 14 17:37:24 CST 2015


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450134805 0
#      Mon Dec 14 23:13:25 2015 +0000
# Node ID 4226922c73feb11bccb5457f16a4e80137a53407
# Parent  d1c056038e9c4e0af4aa8ec9b86d551cbecfacab
hg: add quietempty flag to _showstats

if called with quietempty=True, suppress:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -627,7 +627,9 @@
             srcpeer.close()
     return srcpeer, destpeer
 
-def _showstats(repo, stats):
+def _showstats(repo, stats, quietempty=False):
+    if quietempty and not any(stats):
+        return
     repo.ui.status(_("%d files updated, %d files merged, "
                      "%d files removed, %d files unresolved\n") % stats)
 


More information about the Mercurial-devel mailing list