[PATCH] extensions: suppress load errors when ui is plain
steve at borho.org
steve at borho.org
Mon May 10 08:44:44 CDT 2010
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1273499056 18000
# Node ID 3144c73c953abce9afb1dac24728bba498b69ab7
# Parent 94afe7bc87a9cedd770c16fbf904c7d1bdb880c4
extensions: suppress load errors when ui is plain
Scripts and GUIs will set HGPLAIN to get a consistent output. They
would also appreciate not getting extension warnings on stderr.
diff -r 94afe7bc87a9 -r 3144c73c953a mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -79,7 +79,9 @@
except KeyboardInterrupt:
raise
except Exception, inst:
- if path:
+ if ui.plain():
+ continue
+ elif path:
ui.warn(_("*** failed to import extension %s from %s: %s\n")
% (name, path, inst))
else:
More information about the Mercurial-devel
mailing list