[PATCH stable] keyword: the CVS keyword is $RCSfile$, not $RCSFile$

Benoit Boissinot bboissin at gmail.com
Thu Nov 26 05:53:38 CST 2009


On Thu, Nov 26, 2009 at 11:34 AM, Christian Ebert <blacktrash at gmx.net> wrote:
> # 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.

I'd put the two form at the same place, and the comment on the same
line as RCSFile, something like:
# deprecated, kept only for backward compatibility


More information about the Mercurial-devel mailing list