[issue2975] "hg up" should not remove and re-create directories

Armin Rigo bugs at mercurial.selenic.com
Sat Aug 27 11:41:02 CDT 2011


New submission from Armin Rigo <arigo at tunes.org>:

"hg up" will remove a directory that becomes empty.  However in some
situations doing so causes a single "hg up" command from removing and
re-creating the same directory.  In an extreme example, if you have a single
changeset that renames all files in a directory, then any "hg up" that goes
past this changeset (either back or forward) will cause the directory from
being removed and re-created.

This can be rather confusing if the directory in question is your current
working directory: assuming a Posix platform, after the "hg up", your
current directory is empty and basically invalid (e.g. a subsequent "hg log"
command to try to understand what's going on fails in "abort: No such file
or directory").

I would suggest a solution like delaying the removal of empty directories
until the current command finishes (and then of course not removing them if
they are not empty).

----------
messages: 17258
nosy: arigo
priority: bug
status: unread
title: "hg up" should not remove and re-create directories

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2975>
____________________________________________________


More information about the Mercurial-devel mailing list