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: Daniel Carosone
Subject: Re: [Monotone-devel] diff across branches
Date: Wed, 30 Aug 2006 08:09:11 +1000
User-agent: Mutt/1.5.13 (2006-08-11)

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.

Attachment: pgppc7lc1p6rz.pgp
Description: PGP signature


reply via email to

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