# HG changeset patch # User Brad Schick # Date 1186436531 25200 # Node ID 841568ccc09df173e01e61553550d930898106e5 # Parent 1830bc7676ee213df25f972d1c24c3d62e7f2f78 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. diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -63,9 +63,8 @@ def snapshot_node(ui, repo, files, node, 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, tmpro 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) diff --git a/tests/test-extdiff.out b/tests/test-extdiff.out --- a/tests/test-extdiff.out +++ b/tests/test-extdiff.out @@ -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