Windows people: please help check idea for a new Mercurial repository layout

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Tue Jun 17 01:03:00 CDT 2008


On Mon, Jun 16, 2008 at 2:21 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 16.06.2008 13:58, Peter Arrenbrecht wrote:
>> This may be a rather unconventional idea, but I'll air it
>> nevertheless. Maybe it's going to trigger other ideas and eventually
>> lead somewhere.
>>
>> How about simply skipping aux.i/.d et al. when encountering them on
>> Windows? This would make all accesses to the index/data of such files
>> fail. As I see it, this would have the following consequences:
>>
>> a) You cannot clone such a repo over the wire. Good.
>
> No. that's bad and entierly unneeded.
>
> If I have a repo on a unix box that is intended to be used on
> Windows *and* unix in a mixed platform project and someone
> stupidly checks in a file or dir with the name aux (on unix, obviously),
> then realizes his error (maybe after a friendly Windows colleague telling him),
> checks in another change that deletes the offending
> file again, I can't clone that repo to windows never ever again,
> although I don't even want to checkout that borked changeset.
>
>> b) You can clone such a repo locally when the clone operation is just
>> linking/copying .hg/store based on a walk of .hg/store. Good.
>> c) You cannot update to a revision in which aux is alive. Acceptable
>> (see below)?
>> d) You can update to a revision in which aux is no longer present
>> (renamed, dropped). Good.
>> e) You can push csets from this repo as long as aux is not involved. Good.
>> f) You can pull from such a repo csets where aux is not involved. Good.
>> g) Verify would fail. Good.
>
> Hell no.
>
>> h) The repo does not constitute a complete backup of the original
>> repo. Acceptable?
>
> Absolutely not.
>

Judging by your reaction I'm not sure I got my point across clearly.
Let's say we have repo U on Unix, containing a file called aux. You
then *can* do

  [Windows]
  hg clone http://nix.example.com/hg/U W
  warning: dropping history for the/path/aux (incompatible file name)
  updating working copy

If aux is still active (not deleted in the current revision), you would also get

  warning: not restoring the/path/aux (history missing)

This will create a repo W which lacks aux.i/.d and the clone operation
issues a suitable warning. What you now *cannot* do is

  [some other machine]
  hg clone http://win.example.com/hg/W X

But you *can* do

  [Windows]
  hg clone W X

This is similar to your original proposition to simply abort on
encountering a reserved name instead of hanging. But now we don't
abort. Instead we warn and drop the incompatible files. Granted, this
leaves us with an incomplete repo. But it means Windows people can
still get it and work on the compatible parts (which are all of them
if aux has meanwhile been renamed or deleted). They just cannot be a
full-clone source over the wire (it could be supported, but I don't
think it should). All this without the need for a repo format change.

Cheers,
-parren


More information about the Mercurial mailing list