[PATCH STABLE] progress: respect HGPLAIN

Augie Fackler durin42 at gmail.com
Tue Mar 2 11:47:08 CST 2010


# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1267551905 21600
# Branch stable
# Node ID 63a98797cef2dbf7832ce46cf4f6ec18219061ee
# Parent  6505773080e43e01828a7ddd5caa7522ab4debe6
progress: respect HGPLAIN

diff --git a/hgext/progress.py b/hgext/progress.py
--- a/hgext/progress.py
+++ b/hgext/progress.py
@@ -174,7 +174,7 @@
     # setconfig('progress', 'disable', 'True') to disable this extension
     if ui.configbool('progress', 'disable'):
         return
-    if ui.interactive() and not ui.debugflag and not ui.quiet:
+    if ui.interactive() and not (ui.debugflag or ui.quiet or ui.plain()):
         # we instantiate one globally shared progress bar to avoid
         # competing progress bars when multiple UI objects get created
         global sharedprog
diff --git a/tests/test-progress b/tests/test-progress
--- a/tests/test-progress
+++ b/tests/test-progress
@@ -58,3 +58,6 @@
 
 echo '% test immediate progress completion'
 hg -y loop 0 | python filtercr.py
+
+echo '% respects HGPLAIN'
+HGPLAIN=1 hg -y loop 3 | python filtercr.py
diff --git a/tests/test-progress.out b/tests/test-progress.out
--- a/tests/test-progress.out
+++ b/tests/test-progress.out
@@ -18,3 +18,4 @@
 0 loop.0               [ <=>                                                  ]
 1 loop.1               [  <=>                                                 ]
                                                                                 
% test immediate progress completion
+% respects HGPLAIN


More information about the Mercurial-devel mailing list