hg: add quietempty flag to _showstats
authortimeless <timeless@mozdev.org>
Mon, 14 Dec 2015 23:13:25 +0000
changeset 27402 5184089f5d30
parent 27401 186f2afe9919
child 27403 50b6a04f817f
hg: add quietempty flag to _showstats if called with quietempty=True, suppress: 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
mercurial/hg.py
--- a/mercurial/hg.py	Thu Dec 17 11:00:06 2015 -0800
+++ b/mercurial/hg.py	Mon Dec 14 23:13:25 2015 +0000
@@ -637,7 +637,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)