Clean keyword arg assignment in kwfilelog.add; rename utc() to utcdate() self_initializing_hook
authorChristian Ebert <blacktrash@gmx.net>
Sat, 13 Jan 2007 13:27:13 +0100
branchself_initializing_hook
changeset 93 9f70f953dd3b
parent 92 3c7c187e4001
child 94 d34486cc99b0
child 95 9e4cbe64fb4f
Clean keyword arg assignment in kwfilelog.add; rename utc() to utcdate()
hgkw/keyword.py
--- a/hgkw/keyword.py	Fri Jan 12 13:58:59 2007 +0100
+++ b/hgkw/keyword.py	Sat Jan 13 13:27:13 2007 +0100
@@ -60,9 +60,9 @@
                 break
     return candidates
 
-def utc(hgdate):
+def utcdate(date):
     '''Returns hgdate in cvs-like UTC format.'''
-    return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(hgdate[0]))
+    return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(date[0]))
 
 
 class kwfilectx(context.filectx):
@@ -76,7 +76,7 @@
     def Author(self):
         return util.shortuser(self.user())
     def Date(self):
-        return utc(self.date())
+        return utcdate(self.date())
     def RCSFile(self):
         return os.path.basename(self._path)+',v'
     def Source(self):
@@ -134,7 +134,7 @@
             if self.iskwcandidate(text):
                 text = re_kw.sub(r'$\1$', text)
             return super(kwfilelog, self).add(text,
-                    meta, tr, link, p1=None, p2=None)
+                    meta, tr, link, p1=p1, p2=p2)
 
         def cmp(self, node, text):
             '''Removes keyword substitutions for comparison.'''