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.
This commit is contained in:
Brad Schick 2007-08-06 14:42:11 -07:00
parent e42e7b9d8c
commit eec22b0f45
2 changed files with 4 additions and 14 deletions

View File

@ -63,9 +63,8 @@ def snapshot_node(ui, repo, files, node, tmproot):
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 @@ def snapshot_wdir(ui, repo, files, tmproot):
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)

View File

@ -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 @@ options:
-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