'.' or os.curdir?

Matt Mackall mpm at selenic.com
Tue Dec 12 23:22:59 UTC 2006


On Wed, Dec 13, 2006 at 10:16:49AM +1100, Michael Smith wrote:
> Matt Mackall wrote:
> >On Tue, Dec 12, 2006 at 11:58:23PM +0100, Christian Ebert wrote:
> >>Hello,
> >>
> >>Looking at the source I saw that '.' is used for the current
> >>directory. Wouldn't it make sense to replace that with os.curdir
> >>for portability purposes?
> >
> >Can you name a supported OS where '.' is not the current directory?
> 
> I can't. But in OpenVMS . is not the current directory. You have to 
> refer to it in absolute terms.
> 
> I think it would be good to be as portable as possible, other things 
> being equal.

Unfortunately, other things are not equal. Supporting obscure
operating systems has an ongoing cost. 

If we decide to integrate VMS support into the mainline code, we'll
obviously need to address this issue. But I'm not going to make a
decision on whether we're going to do that until I see how much impact
it's going to have on the codebase.

And until then, there's not much point in adding minor portability
tweaks like this.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list