[PATCH] forget: use forward slashes for internal paths

Matt Mackall mpm at selenic.com
Wed Nov 16 17:44:14 CST 2011


On Tue, 2011-11-15 at 02:50 +0100, Mads Kiilerich wrote:
> Mads Kiilerich wrote, On 11/15/2011 02:47 AM:
> > # HG changeset patch
> > # User Mads Kiilerich<mads at kiilerich.com>
> > # Date 1321321495 -3600
> > # Node ID 5824f6a9565a05e964e872b26a8f7371682a5865
> > # Parent  1bb0a5b02da9ef3505bfb4ac02b2d51cf220220f
> > forget: use forward slashes for internal paths
> >
> > forget into a subrepo failed on windows because pathes were joined with \.
> >
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -2446,7 +2446,7 @@
> >               submatch = matchmod.narrowmatcher(subpath, m)
> >               for fsub in sub.walk(submatch):
> >                   if submatch.exact(fsub):
> > -                    subforget[os.path.join(subpath, fsub)] = (fsub, sub)
> > +                    subforget[subpath + '/' + fsub] = (fsub, sub)
> >           except error.LookupError:
> >               ui.status(_("skipping missing subrepository: %s\n") % subpath)
> >
> 
> I guess this could be fixed in other ways, but this is a simple way to 
> do it.

This is queued, thanks.

> But it seems like it would be convenient and better to have a more 
> subrepo-aware matcher that could encapsulate this.

Indeed.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list