comparison 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
comparison
equal deleted inserted replaced
5108:1830bc7676ee 5109:841568ccc09d
61 if dirname == "": 61 if dirname == "":
62 dirname = "root" 62 dirname = "root"
63 dirname = '%s.%s' % (dirname, short(node)) 63 dirname = '%s.%s' % (dirname, short(node))
64 base = os.path.join(tmproot, dirname) 64 base = os.path.join(tmproot, dirname)
65 os.mkdir(base) 65 os.mkdir(base)
66 if not ui.quiet: 66 ui.note(_('making snapshot of %d files from rev %s\n') %
67 ui.write_err(_('making snapshot of %d files from rev %s\n') % 67 (len(files), short(node)))
68 (len(files), short(node)))
69 for fn in files: 68 for fn in files:
70 if not fn in mf: 69 if not fn in mf:
71 # skipping new file after a merge ? 70 # skipping new file after a merge ?
72 continue 71 continue
73 wfn = util.pconvert(fn) 72 wfn = util.pconvert(fn)
88 dirname = os.path.basename(repo.root) 87 dirname = os.path.basename(repo.root)
89 if dirname == "": 88 if dirname == "":
90 dirname = "root" 89 dirname = "root"
91 base = os.path.join(tmproot, dirname) 90 base = os.path.join(tmproot, dirname)
92 os.mkdir(base) 91 os.mkdir(base)
93 if not ui.quiet: 92 ui.note(_('making snapshot of %d files from working dir\n') %
94 ui.write_err(_('making snapshot of %d files from working dir\n') % 93 (len(files)))
95 (len(files)))
96 for fn in files: 94 for fn in files:
97 wfn = util.pconvert(fn) 95 wfn = util.pconvert(fn)
98 ui.note(' %s\n' % wfn) 96 ui.note(' %s\n' % wfn)
99 dest = os.path.join(base, wfn) 97 dest = os.path.join(base, wfn)
100 destdir = os.path.dirname(dest) 98 destdir = os.path.dirname(dest)