[PATCH 1 of 2] keyword: fix: Use os.sep for Source and Header keywords
Christian Ebert
blacktrash at gmx.net
Sun Feb 7 08:11:15 CST 2010
Hi Kevin,
* Christian Ebert on Wednesday, February 03, 2010 at 09:05:13 +0000
> * 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.
Usually the message for extensions is like:
keyword: use os.sep as path separator in default keywordmaps
>> 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, ),
you will have to break that line.
>> }
>>
>> def __init__(self, ui, repo):
>
> ugh, yes, thank you.
>
> But I think
>
> 'Source': '{root}%s{file},v' % os.sep,
>
> is safe enough and simpler.
test-keyword should not really be problem (it filters the output
of kwdemo), so why don't you go ahead and resubmit this.
Otherwise I might do it ;-)
c
--
\black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_
Ein deutscher Western/A German Western
--->> http://www.blacktrash.org/underdogma/ccc.php
More information about the Mercurial-devel
mailing list