[PATCH 0 of 1] avoid deleting symbolically linked directories on windows

Paul Moore p.f.moore at gmail.com
Mon May 11 12:55:50 CDT 2009


2009/5/11 Henrik Stuart <henrik.stuart at edlund.dk>:
> So the fact that os.removedirs works as intended (i.e. doesn't try to
> remove levels above the repository) is fairly incidental and due to the
> fact that .hg is always there in the real directory.

Personally, I think this is the problem here. Surely we shouldn't be
even attempting to remove the repository directory in the first place?
Relying on the facts that (a) rmdir doesn't work on a non-empty
directory and (b) the repository root will always contain a .hg
subdirectory, seems to be asking for trouble. This case shows (a)
failing, and if someone ever implements a change to allow the .hg
directory to be stored elsewhere, (b) would then fail too.

Better to fix the real problem here, in my view.

Paul.


More information about the Mercurial-devel mailing list