changeset 12631:7b34fdffed65

keyword: switch kwtemplater.record in kw_dorecord() Obsoletes the need for a global recordcommands variable.
author Christian Ebert <blacktrash@gmx.net>
date Fri, 08 Oct 2010 18:39:46 +0100
parents 94926263b7ab
children 6c98107f787e
files hgext/keyword.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Fri Oct 08 18:39:46 2010 +0100
+++ b/hgext/keyword.py	Fri Oct 08 18:39:46 2010 +0100
@@ -98,8 +98,6 @@
 # not when reading filelog, and unexpand when reading from working dir
 restricted = 'merge kwexpand kwshrink record qrecord resolve transplant'
 
-# commands using dorecord
-recordcommands = 'record qrecord'
 # names of extensions using dorecord
 recordextensions = 'record'
 
@@ -155,7 +153,7 @@
         self.repo = repo
         self.match = match.match(repo.root, '', [], inc, exc)
         self.restrict = kwtools['hgcmd'] in restricted.split()
-        self.record = kwtools['hgcmd'] in recordcommands.split()
+        self.record = False
 
         kwmaps = self.ui.configitems('keywordmaps')
         if kwmaps: # override default templates
@@ -570,6 +568,7 @@
         try:
             # record returns 0 even when nothing has changed
             # therefore compare nodes before and after
+            kwt.record = True
             ctx = repo['.']
             modified, added = repo[None].status()[:2]
             ret = orig(ui, repo, commitfunc, *pats, **opts)