[PATCH] subrepo: make sure that the source path is stripped

David Soria Parra sn_ at gmx.net
Wed Feb 10 03:35:06 CST 2010


>>> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
>>> --- a/mercurial/subrepo.py
>>> +++ b/mercurial/subrepo.py
>>> @@ -41,7 +41,7 @@
>>>                 raise util.Abort(_('missing ] in subrepo source'))
>>>             kind, src = src.split(']', 1)
>>>             kind = kind[1:]
>>> -        state[path] = (src, rev.get(path, ''), kind)
>>> +        state[path] = (src.strip(), rev.get(path, ''), kind)
>>
>> What about source paths that start/end with spaces? It seems silly,  
>> but if nothing else it's worth mentioning in some docs that it won't  
>> work.
> 
> This is coming out of the config parser, which already strips?
In the case

foo = [git] bar

the space before bar is not stripped by the parser and I don't think any
url accepted by subrepos allows spaces.




More information about the Mercurial-devel mailing list