[PATCH stable] keyword: the CVS keyword is $RCSfile$, not $RCSFile$ (3rd version)
Christian Ebert
blacktrash at gmx.net
Thu Nov 26 10:55:04 CST 2009
Hi,
Until there's a decision on whether $RCSFile$ can be deprecated
and then omitted at some point, this should do.
c
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1259229077 -3600
# Branch stable
# Node ID 82c0405336a3e81282e33d231cdc8af11dae1672
# 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,7 +111,8 @@
'Revision': '{node|short}',
'Author': '{author|user}',
'Date': '{date|utcdate}',
- 'RCSFile': '{file|basename},v',
+ 'RCSfile': '{file|basename},v',
+ 'RCSFile': '{file|basename},v', # kept only for backwards compatibility
'Source': '{root}/{file},v',
'Id': '{file|basename},v {node|short} {date|utcdate} {author|user}',
'Header': '{root}/{file},v {node|short} {date|utcdate} {author|user}',
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