# HG changeset patch # User Christian Ebert # Date 1240304167 -3600 # Node ID 70220c2a4940620cff448955ebf954c2e3558ff0 # Parent f7865fb770fe36f7e6c39269ec18af541c37b843 keyword: set overwrite message only once, not for each file [ original upstream message ] diff -r f7865fb770fe -r 70220c2a4940 hgkw/keyword.py --- a/hgkw/keyword.py Mon Apr 20 21:16:13 2009 -0300 +++ b/hgkw/keyword.py Tue Apr 21 09:56:07 2009 +0100 @@ -179,6 +179,8 @@ candidates = [f for f in files if self.iskwfile(f, ctx.flags)] if candidates: self.restrict = True # do not expand when reading + msg = (expand and _('overwriting %s expanding keywords\n') + or _('overwriting %s shrinking keywords\n')) for f in candidates: fp = self.repo.file(f) data = fp.read(mf[f]) @@ -192,10 +194,6 @@ else: found = self.re_kw.search(data) if found: - if expand: - msg = _('overwriting %s expanding keywords\n') - else: - msg = _('overwriting %s shrinking keywords\n') notify(msg % f) self.repo.wwrite(f, data, mf.flags(f)) self.repo.dirstate.normal(f)