# HG changeset patch # User Christian Ebert # Date 1196579736 -3600 # Node ID a5f5bbf4a66813fbc1267bc3d9a75f74970951a0 # Parent 2a20fa26704198daa529ec38f844a8a5473e95e8 Make path format output switches more compact diff -r 2a20fa267041 -r a5f5bbf4a668 hgkw/keyword.py --- a/hgkw/keyword.py Sun Dec 02 08:00:31 2007 +0100 +++ b/hgkw/keyword.py Sun Dec 02 08:15:36 2007 +0100 @@ -326,8 +326,8 @@ ui.note(_('unhooked all commit hooks\n')) ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg)) repo.commit(text=msg) - pathinfo = ('', ' in %s' % path)[ui.verbose] - demostatus('%s keywords expanded%s' % (kwstatus, pathinfo)) + format = ui.verbose and ' in %s' % path or '' + demostatus('%s keywords expanded%s' % (kwstatus, format)) ui.write(repo.wread(fn)) ui.debug(_('\nremoving temporary repo %s\n') % tmpdir) shutil.rmtree(tmpdir, ignore_errors=True) @@ -368,10 +368,7 @@ if allf or ignore: kwfstats += (('I', [f for f in files if f not in kwfiles]),) for char, filenames in kwfstats: - if allf or ui.verbose: - format = '%s %%s\n' % char - else: - format = '%s\n' + format = (allf or ui.verbose) and '%s %%s\n' % char or '%s\n' for f in filenames: ui.write(format % repo.pathto(f, cwd))