monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: Multiple projects in one database -- branch con


From: Nathaniel J. Smith
Subject: Re: [Monotone-devel] Re: Multiple projects in one database -- branch confusion
Date: Thu, 7 Dec 2006 12:02:40 -0800
User-agent: Mutt/1.2.5.1i

On Thu, Dec 07, 2006 at 07:58:29AM -0800, Steven E. Harris wrote:
> Say I use merge_into_dir as discussed, get the files on the target
> "prototype" branch in a new directory ("experiment"), then decide I
> want to start moving them around within the tree. Maybe I move
> /experiment/one.txt  to /six.txt:
[..]
> Now, /six.txt used to be /experiment/one.txt, which is known as
> /one.txt in the "project.experiment" branch.
> 
> If I use propagate now from project.experiment to project.prototype,
> will monotone be able to follow the relocated file?

Yes.

Monotone never cares about filenames when merging; it always
identifies files by tracing back their history, and two files are the
same if they trace back to the same "add" event.  (It caches some
information so that it doesn't have to actually walk around on the
revision graph to figure this out at runtime, but this is just an
optimization.)

merge_into_dir is fundamentally just a rename event -- you renamed a
directory to have a new name and a new parent.  It happens that the
old directory is a magical directory named "", and the new parent is
another, different, magical directory named "", but as far as
monotone's actual logic is concerned, directories with that name are
not actually very magical after all.  (The only thing that's _really_
special about them is that we require that some directory have that
name in every commit.)

-- Nathaniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]