diff hgext/extdiff.py @ 5109:841568ccc09d

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.
author Brad Schick <schickb@gmail.com>
date Mon, 06 Aug 2007 14:42:11 -0700
parents 1830bc7676ee
children 2be225ea5722
line wrap: on
line diff
--- 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)