monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] diff across branches


From: chris wein
Subject: Re: [Monotone-devel] diff across branches
Date: Tue, 29 Aug 2006 20:13:36 -0700 (PDT)

Hi,
  Thanks for the advices.

   I think I have to take this as my use case limitations. I'm having
this problem when using monotone in help tracking a third party
package, so it would be a bit difficult to control what went in
different branches.

Cheers
Chris

Daniel Carosone <address@hidden> wrote:
On Tue, Aug 29, 2006 at 02:57:50AM -0700, chris wein wrote:
> If I have the same file F added to branches A1 and A2

This is one of those cases where hindsight is a great teacher. In
this case, you added the same file independently in two places, and as
a result they're seen as different files from now on - not just for
diff, but also for propagate and other similar commands.

If at the time of adding the file, you knew you'd want the file to be
seen as the same for the two branches, you could have used the
DaggyFixes pattern to add the file to a common early ancestor of both,
and then merge the addition forward down each branch.

Of course, if you didn't know this at the time (or if there's a third
even older branch you now decide needs the file as well) it's too
late. There's presently no way to clone or add files that already
exist elsewhere such that they wind up being seen as linked to the
same underlying history. There are several cases where this might be
useful, including this one, so it might appear some day.

Depending on your circumstances, you could still do something like
this to make the situation easier going forward: you could add the
file to the early ancestor, and drop (or rename) the current file from
both of the branches (to prevent a conflict), then merge as before,
and then apply any changes along the branch from the previous file to
reproduce the current content. This trades a history disconnect
between branches for a history disconnect along each branch, but this
might be a good trade if your main concern is that future diffs and
merges for branch heads show the file as connected.

Or if you just want the one-off diff, use cat as njs suggested.

--
Dan.


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
reply via email to

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