two factors for switching to Mercurial

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Tue Jun 17 02:53:25 CDT 2008


On Tue, Jun 17, 2008 at 9:26 AM, Martin Geisler <mg at daimi.au.dk> wrote:
> Matt Mackall <mpm at selenic.com> writes:
>
>> On Mon, 2008-06-16 at 11:13 +0200, Martin Geisler wrote:
>>> Mercurial does not version control directories -- I don't really
>>> know why, though.
>>
>> It's very simple: almost all directories are implied by the
>> existence of files. The main benefit of explicitly tracking
>> directories is that you can track empty directories. And that's a
>> whole lot of extra complexity to track a whole lot of nothing.
>
> I see, that is a good point for empty directories. Writing code to
> manage nothing seem silly :-)
>
> For non-empty directories I can see a potential advantage of being
> able to version it: if I rename a directory in my clone and another
> guy makes a new file within the directory in his clone (before seeing
> the rename), then upon merging the right thing can happen if Mercurial
> would track the directory rename.
>
> I have only had to deal with this once, though, and it was of course
> no problem for me to manually rename the new file upon merging.

Hg actually assumes that when all the files in a particular directory
have been renamed to a different directory that you meant to rename
the directory as such.

See also: http://www.selenic.com/mercurial/bts/issue850

-parren


More information about the Mercurial mailing list