monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Splitting a file and preserving history


From: Justin Patrin
Subject: Re: [Monotone-devel] Splitting a file and preserving history
Date: Tue, 27 Feb 2007 14:13:27 -0800

On 2/27/07, Eric Anderson <address@hidden> wrote:
All,
        Yesterday, while working on project, I wanted to split a file
into two separate files.  I was hoping to preserve the history on one
of the split out files so that things like annotate would tell you
where various bits came from.  Unfortunately, I couldn't figure out a
way to do this, and looking at the monotone history, when the same
operation occurred (commands.cc -> cmd_*.cc) the new files were just
added, and the old file had all the bits removed, losing easy access
to the history information.
        So I have two questions:

   1) have I missed the feature somewhere?

   2) does such a thing make sense in the current monotone structure?
      It would be similar to mtn rename, but instead would be a copy.
      If it makes sense, and seems valuable to others, can anyone give
      me a pointer to where I would go to add this feature?


The easiest way to support this would be to allow copying of a file
within monotone, keeping its hostory. This should be entirely feasable
but will need some thought as to how merge operations work. The
interesting cases are those where a file is copied in one "branch" but
not in another and changes are made independently. If you make changes
to the non-copied branch and merge to the copied branch the changes
should likely be applied to both the copies. However, if you made the
copy in order to "split" the content then one or both of the copies
are going to have a content conflict (I think).

Even worse is what happens if you make changes on both sides?

Likely this will all work out if you consider each file's ancestry on
its own but none of this has been implemented or thought completely
through, AFAIK.

--
Justin Patrin




reply via email to

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