[PATCH 0/3] Permit directories ending in *.d or *.i

Goffredo Baroncelli kreijack at aliceposta.it
Thu Jul 28 19:05:06 UTC 2005


On Wednesday 27 July 2005 19:29, you (Matt Mackall) wrote:
[...] 
> I'd rather use an escaping scheme. Something likes:
> 
> def encodedir(dir):
>     if dir.endswith(".d") or dir.endswith(".i") or dir.endswith(".hg"):
>         dir += ".hg"
>     return dir
> 
> def decodedir(dir):
>     if dir.endswith(".hg"):
>         dir = dir[:-3]
>     return dir
> 
> I think this handles all the cases and should do so without breaking
> existing repos.

No, if anyone has already an old repository with a directory named 'a.d', your scheme fails.

If fact my scheme and your are the same, the only difference is that you 'escape' only 
the directories which can conflict, I 'escape' every directory.

So from a backward compatibility point of view we have two solution:
1) accept the limit that the 'old' repositories don't allow a file like 'a' 
if a directory in 'a.d' already exists  ( for every directory we can try to
access first 'a.d' the 'a.d.hg' to solve compatibility problems )
- good: better compatibility
- bad:  more complex 
2) accept the idea of different repositaries version, and help the user to migrate 
to the newest
- good: more simple
- bad:  needed of upgrading the repository

issues 1 and 2 are not related to the escape scheme ( every directory or only the ones 
which needed )


Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack AT inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9



More information about the Mercurial mailing list