Greg Hudson wrote:
> On Fri, 2005-10-28 at 00:26 +0100, Julian Foad wrote:
>>>The meaning of "svn diff -c A,B,C,D foo" is a diff between foo as of rev
>>>A-1 and that same text with revs A, B, C, and D applied to it.
>>Er... Did you mean to sound so authoritative?
> First, because "svn diff -c A,B,C,D" should show the change which would
> be merged by "svn merge -c A,B,C,D".
> Second, from first principles: if "svn diff -c A,B,C,D" means "show me
> the composition of changes A, B, C, and D", then it's pretty obvious
> what changes we should be composing, and it's pretty obvious what base
> we should be applying those changes to for context.
Ah, but it's not obvious that we should be composing the four changes.
> What other meaning did you have in mind?
I'm starting from the intent of merging all four changes, say onto a branch.
(I'll address "diff" afterwards.) The four changes in the repository are:
We agree that if we try to apply them sequentially onto base (rA-1), then B, C
and D might conflict: that is, might not merge cleanly, and therefore might not
be able to be combined into a single diff against (rA-1), since merging is part
of the algorithm required to combine diffs.
Obviously A can be merged into a target that looks like rA-1 (at least in the
relevant part of the text) without conflicts; similarly B can be merged into a
target that looks like rB-1, etc. Given that the user expects this merge to
succeed, he/she may well have already made (the relevant parts of) the branch
look like all of rB-1, rC-1 and rD-1 by previous merges or manual tweaking or
Therefore my idea is to merge the four individual changes into the target
successively, each diffed against its own predecessor. The end result will be
somewhat, but not exactly, as if we had composed a single diff by merging them
into a target equal to (rA-1).
Finally, "diff" would output the four changes in succession, or perhaps combine
them where unambiguously possible, e.g. where the relevant portion of rB-1 is
equal to the same portion of rA. You could argue that such a sequence of diffs
is not strictly "a diff", but it is a possible valid and useful output from
"svn diff" for human consumption and for "patch".
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Oct 28 11:37:05 2005