Comment 2 for bug 65265

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: [Bug 65265] Re: simpler syntax for "diff since last merge"

> This is a common requirement for Launchpad development. The question I
> often want to answer is, what changes will I be responsible for
> merging... what code do I need to get reviewed.
[...]
>
> When I ask for the diff, I don't want a diff against the current
> mainline, because that may have changed since I merged from it. I want
> to diff against the mainline I merged from.

For the case of reviewing changes that will be merged, diff against the last
ancestor isn't necessarily correct. If Steve does this fairly common sequence:

  * branches off mainline
  * makes some changes
  * merges in more recent mainline
  * makes more changes

Then what you really want is the diff produced by:

   bzr branch mainline tmp
   cd tmp
   bzr merge ../steve's-changes
   bzr diff

There's (generally) no ancestor you can pick in this scenario that will produce
the diff that merge creates. Diffing against the original branch point will
show changes Steve didn't make and have already been merged in by someone else,
and diffing against the most recently merged revision will omit some of the
changes Steve did make.

So really what Steve needs is more "--if-merged-into" than "--since-merge".

I'd find such a feature useful. Come to think of it, I believe that "bzr bundle
-rbranch:b1 | filterdiff" produces such a diff already!