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

Matt Mackall mpm at selenic.com
Tue Feb 9 16:57:10 CST 2010


On Tue, 2010-02-09 at 11:37 -0600, Augie Fackler wrote:
> On Feb 9, 2010, at 11:33 AM, David Soria Parra wrote:
> 
> > # HG changeset patch
> > # User David Soria Parra <dsp at php.net>
> > # Date 1265736777 -3600
> > # Node ID 934e60c06afb90922ff4163190512512b5217006
> > # Parent  9b87c5f4c634b9718940e6380a62d7fcf1bcddaf
> > subrepo: make sure that the source path is stripped
> >
> > 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?

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list