# HG changeset patch # User Christian Ebert # Date 1184324279 -7200 # Node ID 3aed363c9eafe93705e16fc21cce369cab2a26df # Parent f8e5cafa7b99d8cf35416b7a11f35c2b61a0d646 Cosmetic changes for overwrite condition, single quotes diff -r f8e5cafa7b99 -r 3aed363c9eaf hgkw/keyword.py --- a/hgkw/keyword.py Fri Jul 13 12:56:09 2007 +0200 +++ b/hgkw/keyword.py Fri Jul 13 12:57:59 2007 +0200 @@ -82,7 +82,7 @@ from mercurial import cmdutil, context, filelog # findcmd might be in cmdutil or commands # depending on mercurial version -if hasattr(cmdutil, "findcmd"): +if hasattr(cmdutil, 'findcmd'): findcmd = cmdutil.findcmd else: findcmd = commands.findcmd @@ -249,7 +249,7 @@ else: return filelog.filelog(self.sopener, f) - def commit(self, files=None, text="", user=None, date=None, + def commit(self, files=None, text='', user=None, date=None, match=util.always, force=False, lock=None, wlock=None, force_editor=False, p1=None, p2=None, extra={}): '''Wraps commit, expanding keywords of committed and @@ -275,11 +275,10 @@ candidates = [f for f in candidates if kwfmatcher(f) and f not in removed and not os.path.islink(self.wjoin(f))] - if not candidates: - return node + if candidates: + kwt = kwtemplater(ui, self, node=node) + kwt.overwrite(candidates) - kwt = kwtemplater(ui, self, node=node) - kwt.overwrite(candidates) return node finally: if wrelease: