extdiff: made it less chatty in non-verbose mode
Made the status info only display in verbose mode since most hg commands aren't so chatty. This also makes it cleaner for other extensions to call extdiff.
--- a/hgext/extdiff.py Mon Aug 06 14:32:23 2007 -0700
+++ b/hgext/extdiff.py Mon Aug 06 14:42:11 2007 -0700
@@ -63,9 +63,8 @@
dirname = '%s.%s' % (dirname, short(node))
base = os.path.join(tmproot, dirname)
os.mkdir(base)
- if not ui.quiet:
- ui.write_err(_('making snapshot of %d files from rev %s\n') %
- (len(files), short(node)))
+ ui.note(_('making snapshot of %d files from rev %s\n') %
+ (len(files), short(node)))
for fn in files:
if not fn in mf:
# skipping new file after a merge ?
@@ -90,9 +89,8 @@
dirname = "root"
base = os.path.join(tmproot, dirname)
os.mkdir(base)
- if not ui.quiet:
- ui.write_err(_('making snapshot of %d files from working dir\n') %
- (len(files)))
+ ui.note(_('making snapshot of %d files from working dir\n') %
+ (len(files)))
for fn in files:
wfn = util.pconvert(fn)
ui.note(' %s\n' % wfn)
--- a/tests/test-extdiff.out Mon Aug 06 14:32:23 2007 -0700
+++ b/tests/test-extdiff.out Mon Aug 06 14:42:11 2007 -0700
@@ -1,9 +1,5 @@
adding a
-making snapshot of 0 files from rev 000000000000
-making snapshot of 1 files from working dir
Only in a: a
-making snapshot of 0 files from rev 000000000000
-making snapshot of 1 files from working dir
diffing a.000000000000 a
hg falabala [OPTION]... [FILE]...
@@ -26,14 +22,10 @@
-X --exclude exclude names matching the given patterns
use "hg -v help falabala" to show global options
-making snapshot of 1 files from rev e27a2475d60a
-making snapshot of 1 files from rev 5e49ec8d3f05
diffing a.e27a2475d60a a.5e49ec8d3f05
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
-making snapshot of 1 files from rev 5e49ec8d3f05
-making snapshot of 1 files from working dir
diffing a.5e49ec8d3f05 a
diff-like tools yield a non-zero exit code