[PATCH stable] keyword: the CVS keyword is $RCSfile$, not $RCSFile$
Christian Ebert
blacktrash at gmx.net
Thu Nov 26 04:34:25 CST 2009
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1259229077 -3600
# Branch stable
# Node ID 9ac7d9f8d6eb6c8f400bd5802d38ad2748648840
# Parent b22ff29a3fbb1c1841c1c5b62f510c5ca2c782c3
keyword: the CVS keyword is $RCSfile$, not $RCSFile$
http://cvsbook.red-bean.com/cvsbook.html#List%20Of%20Keywords
Fix default keyword map accordingly.
Keep $RCSFile$ for Mercurial backwards compatibility.
diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -111,11 +111,14 @@
'Revision': '{node|short}',
'Author': '{author|user}',
'Date': '{date|utcdate}',
- 'RCSFile': '{file|basename},v',
+ 'RCSfile': '{file|basename},v',
'Source': '{root}/{file},v',
'Id': '{file|basename},v {node|short} {date|utcdate} {author|user}',
'Header': '{root}/{file},v {node|short} {date|utcdate} {author|user}',
+ 'RCSFile': '{file|basename},v',
}
+ # RCSFile (vs. RCSfile) as default template is supported for backwards
+ # compatibility with broken previous versions of this extension.
def __init__(self, ui, repo):
self.ui = ui
diff --git a/tests/test-keyword.out b/tests/test-keyword.out
--- a/tests/test-keyword.out
+++ b/tests/test-keyword.out
@@ -4,18 +4,20 @@
[keyword]
demo.txt =
[keywordmaps]
+Source = {root}/{file},v
+RCSfile = {file|basename},v
+Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
+Author = {author|user}
+Date = {date|utcdate}
RCSFile = {file|basename},v
-Author = {author|user}
-Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
-Source = {root}/{file},v
-Date = {date|utcdate}
Id = {file|basename},v {node|short} {date|utcdate} {author|user}
Revision = {node|short}
+$Source: /TMP/demo.txt,v $
+$RCSfile: demo.txt,v $
+$Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
+$Author: test $
+$Date: 2000/00/00 00:00:00 $
$RCSFile: demo.txt,v $
-$Author: test $
-$Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
-$Source: /TMP/demo.txt,v $
-$Date: 2000/00/00 00:00:00 $
$Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
$Revision: xxxxxxxxxxxx $
[extensions]
More information about the Mercurial-devel
mailing list