trouble cloning among different systems to be expected?

Adrian Buehlmann adrian at cadifra.com
Fri Jul 10 08:44:36 CDT 2009


On 10.07.2009 14:39, Marko Käning wrote:
> Hi,
> 
> just wanted to ask the list before I do experiments on this one:
> 
> Will I run into trouble if I do the following:
> 
> 
>  1) I have a main repo on a linux server A. (UTF-8)
> 
>  2) I clone it using TortoiseHg on a WXP/W2k machine B onto a USB stick.
> 
>  3) I synchronize said clone on another linux machine C on the command 
>     line from the directly mounted USB stick. (UTF-8)
> 
> 
> Do I run into trouble with line endings or charsets in this scenario?
> 
> 
>  Preventively I'd replace step 2 by cloning directly on the server A on 
>  a then directly mounted USB stick.
> 
> 
> Am I too nervous, or is it really not a good idea to mix Linux and Windows 
> systems in this case?

There should be no problem with the files inside the .hg dir mixing
Linux and Windows, provided you

(a) use the fncache repo format (repos created with Mercurial >= 1.1.1)
(b) don't use explorer of Windows Vista to copy the .hg dir if you have
    file names starting with space chars (issue 1713)

Given these constraints, the .hg dir of any repository should be freely
copyable on the file level from linux to windows and vice versa.

Cloning over the wire can be done with any combinations of Mercurial
versions and platforms anyway.

The working dir (everything outside .hg) is an entirely different
matter, as Mercurial does not transform file names in any way
when checking in and checking out files.

Mercurial treats file names in the working dir as sequences of bytes
on all platforms.

So the interpretation of the file names in the working dir when
checking in a file on Linux with a name that you consider being in
UTF-8 might be a problem if you check it out on Windows, since Windows
will not be able to interpret that file name in the same way.

If you want to work on Linux and Windows using files from
the same repository you will have to restrict yourself to
using only file names that mean the same on both systems.

But I'm sure Matt will be able to explain all this much better.





More information about the Mercurial mailing list