Reporting "nearly-exact" adds (Was: Windows test suite state)

Matt Mackall mpm at selenic.com
Fri Jun 6 21:12:06 CDT 2008


On Sat, 2008-06-07 at 02:00 +0200, Adrian Buehlmann wrote:
> On 06.06.2008 01:42, Adrian Buehlmann wrote:
> > Sigh. It seems we have some more serious issues with hg add
> > than just test output differences:
> > 
> > With your patches applied (plus that known bug fixed), on Windows
> > (hgt = hg -- just my wrapper bat):
> > 
> >> hgt sta
> > --- running hg from W:\hg-crew-paul
> > ? x\a.txt
> > 
> >> hgt add x\a.txt
> > --- running hg from W:\hg-crew-paul
> > adding x\a.txt
> > 
> >> hgt sta
> > --- running hg from W:\hg-crew-paul
> > A x\a.txt
> > ? x\a.txt
> > 
> > last output looks like there is some serious confusion
> > in the dirstate (same file both "unkown" and "added").
> 
> Paul, this has been outdated by your newest resending of your
> patches (which is good). But I just wanted to add something to the
> above, which I think is important (I used that same outdated codebase
> as above):
> 
> Looking at:
> 
> > hgt debugstate
> --- running hg from W:\hg-crew-paul
> a   0         -1 unset               x\a.txt
> 
> I see that in this old version of the codebase, the paths
> in the dirstate used *backslases* for the path separator.
> 
> With your newest codebase (c8b1fb9e1957, checked by using your
> binary I downloaded) I see debugstate now returns *forward* slashes
> -- which seems very good to me.
> 
> Since the dirstate is stored as a file at .hg/dirstate,
> I think I now understand that the path separators inside the
> dirstate by all means must be *forward* slahes (*not* backslashes).
> 
> The reason for this seems clear: the whole repo
> -- that is, the directory which contains the .hg dir --
> with all its contents ("working directory" plus .hg dir) must
> be:
> 
> * Compatible from one Mercurial release to the next
> * Transferrable from unix to Windows and vice versa

Yep, that's right. All paths internal to Mercurial (in dirstate,
changelog, manifest, in copy records, over the wire, etc.) are assumed
to have a "/" separator.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list