[PATCH] keyword: split line continuation in 2 steps (style)

Christian Ebert blacktrash at gmx.net
Fri Feb 1 03:16:01 CST 2008


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1201857232 -3600
# Node ID f3a0197efe06f8a32aff204dd1f5fc0e95c6a031
# Parent  31726c27e40e59cedfdf2143c5c4c265e0e346f6
keyword: split line continuation in 2 steps (style)

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -25,7 +25,9 @@
 #
 #   [extensions]
 #   # enable extension
-#   hgext.keyword =
+#   keyword = /full/path/to/hgkw/keyword.py
+#   # or, if script in canonical hgext folder:
+#   # hgext.keyword =
 #
 # Files to act upon/ignore are specified in the [keyword] section.
 # Customized keyword template mappings in the [keywordmaps] section.
@@ -149,8 +151,8 @@
             self.ct.use_template(self.templates[kw])
             self.ui.pushbuffer()
             self.ct.show(changenode=fnode, root=self.repo.root, file=self.path)
-            return '$%s: %s $' % (kw, templatefilters.firstline(
-                self.ui.popbuffer()))
+            ekw = templatefilters.firstline(self.ui.popbuffer())
+            return '$%s: %s $' % (kw, ekw)
 
         return subfunc(kwsub, data)
 


More information about the Mercurial-devel mailing list