[PATCH 2 of 2] addremove: restore the relative path printing when files are named

Martin von Zweigbergk martinvonz at google.com
Thu Dec 4 23:35:36 CST 2014


On Thu Dec 04 2014 at 9:28:40 PM Matt Harbison <mharbison72 at gmail.com>
wrote:

> On Fri, 05 Dec 2014 00:03:40 -0500, Martin von Zweigbergk
> <martinvonz at google.com> wrote:
>
> > This series looks good to me. Thanks!
> >
> > On Thu Dec 04 2014 at 8:48:18 PM Matt Harbison <mharbison72 at gmail.com>
> > wrote:
> >
> >>
> >> The test change demonstrates the correctness when a file is specified
> >> (i.e. the
> >> glob is required on Windows because relative paths use '\' and absolute
> >> paths
> >> use '/').
> >>
> >
> > Off topic, but it seems weird that absolute paths would use '/'. At
> > first I
> > thought it was a typo, but then I saw the absolute paths in your mail
> > about
> > Mads's rebase patch. Do you know why absolute paths use '/'? I don't even
> > use Windows anymore, so it doesn't matter to me; I'm just curious.
>
> For the series we've been discussing, "absolute" isn't absolute in the
> sense of 'C:\dir' or '/var/log'- I guess it is just "absolute" from the
> top of the repo.  I think I read a comment somewhere recently that
> dirstate always uses '/' as a separator, and that was carried forth with
> the file names in walk().  Sometimes the '/' also leaks into windows for
> relative paths because there are various bits of code that do '"parent" +
> "/" + "file"' joins instead of os.path.join().
>

OK, so not entirely intentional. Thanks for explaining.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20141205/ffe992a6/attachment.html>


More information about the Mercurial-devel mailing list