[PATCH 1 of 2] keyword: fix: Use os.sep for Source and Header keywords

Kevin Grover kevin at kevingrover.net
Fri Feb 5 22:24:27 CST 2010


On Fri, Feb 5, 2010 at 10:23 AM, Christian Ebert <blacktrash at gmx.net> wrote:

> * Kevin Grover on Wednesday, February 03, 2010 at 17:32:49 -0600
> > On Wed, Feb 3, 2010 at 3:05 AM, Christian Ebert <blacktrash at gmx.net>
> wrote:
> >
> >> * Kevin Grover on Saturday, January 30, 2010 at 14:53:38 -0600
> >>> # HG changeset patch
> >>> # User Kevin O. Grover <kevin at kevingrover.net>
> >>> # Date 1264179036 28800
> >>> # Node ID 02ffdeb799f73cc3c1a04627586cf3039dc5b058
> >>> # Parent  e898bc7810ad08affd99d4420c89165252db194c
> >>> Use os.sep as path separator in keywords.
> >>>
> >>> diff -r e898bc7810ad -r 02ffdeb799f7 hgext/keyword.py
> >>> --- a/hgext/keyword.py    Thu Jan 21 13:26:26 2010 +0100
> >>> +++ b/hgext/keyword.py    Fri Jan 22 08:50:36 2010 -0800
> >>> @@ -82,7 +82,7 @@
> >>> from mercurial.lock import release
> >>> from mercurial.node import nullid
> >>> from mercurial.i18n import _
> >>> -import re, shutil, tempfile
> >>> +import re, shutil, tempfile, os
> >>>
> >>> commands.optionalrepo += ' kwdemo'
> >>>
> >>> @@ -115,9 +115,9 @@
> >>>        'RCSfile': '{file|basename},v',
> >>>        'RCSFile': '{file|basename},v', # kept for backwards
> >> compatibility
> >>>                                        # with hg-keyword
> >>> -        'Source': '{root}/{file},v',
> >>> +        'Source': '{root}%s{file},v' % (os.sep, ),
> >>>        'Id': '{file|basename},v {node|short} {date|utcdate}
> >> {author|user}',
> >>> -        'Header': '{root}/{file},v {node|short} {date|utcdate}
> >> {author|user}',
> >>> +        'Header': '{root}%s{file},v {node|short} {date|utcdate}
> >> {author|user}' % (os.sep, ),
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> > My original message (and your quoted reply) have the patch in the text.
>  I
> > also attached it to make it easier to extract (for those using webmail).
> > What did I do wrong.
>
> Your mail client wrapped some long lines, see above.
>
>
I use gmail.  If I posted from Thunderbird (or some other client) instead of
the web interface, would that still happen?


> > E.g. how should I have included it?
>
> E.g., after enabling the patchbomb extension:
>
> hg email -t mercurial-devel at selenic.com -r <rev0>:<rev3>
>
>
Excellent.  Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100205/ec1464fb/attachment.htm>


More information about the Mercurial-devel mailing list