[PATCH 0 of 1] avoid deleting symbolically linked directories on windows
Matt Mackall
mpm at selenic.com
Mon May 11 11:23:25 CDT 2009
On Mon, May 11, 2009 at 04:01:41PM +0200, Henrik Stuart wrote:
> On Windows, it is possible to make symbolic linked directories or
> junction points (hardlinks) - together reparse points - to an entire
> hg repository including a working directory, e.g.:
>
> foo/
> .hg
> [files]
>
> bar/ [symlinkd:foo]
>
> If you do a hg up null or hg up {revision with removed files} then
> util.unlink will try to run os.removedirs(path), which will
> recursively remove directories until it fails. We expect that bar/
> should not be deleted, but os.rmdir on a symlink or junction point
> succeeds without further issues. A following branch state write will
> then recreate the directory, as a directory rather than as a reparse
> point, and users will be very confused.
Confused. bar/ points to the root of a repository? Why do we ever
unlink the root of a repository? That seems like a bug?
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list