On 23.10.2013 18:45, Julian Foad wrote:
> Julian Foad wrote:
>
>> Branko Čibej wrote:
>>>  Another option -- somewhat less dependent on a completely new
>>>  feature -- might be this:
>>>
>>>     svn diff -rROOT:HEAD
>> Well, you haven't ascribed a meaning to that syntax.  If you mean it should 
>> compare the "root of the branch" with the "tip" of the same 
>> branch, then no, that's not what we're looking for.  We're looking 
>> for (that diff) MINUS (whatever's been merged onto that branch from trunk).
> ... alternatively, if "root of the branch" means "base of last merge between 
> trunk and branch" (assuming the last merge was trunk-to-branch, that's the 
> same as "last point on trunk that you caught up to"), then yes that's what I 
> mean.

Here's a more complete proposal:

Introduce two new revision keywords:

  * ROOT (alternatively: CREATED)
    Represents the revision in which a directory was originally created.
    This is different from the revision reported by 'svn log
    --stop-on-copy' in that it will "see through" any renames of that
    directory.
    When used in the context of a branch, it effectively represents the
    branchpoint revision.

  * MERGED
    Only relevant in the context of a branch. Represents the latest
    revision in which a merge was made to the branch. This revision may
    depend on a discriminator parameter, which is a branch URL, such
    that the result is the revision of the latest merge from that branch.


Example usage:

  * svn info
      o 'svn info -rROOT' or 'svn info -rCREATED'
        Returns information about the revision in which the directory
        was created; i.e., the branchpoint revision. Works with any
        directory, wether WC path or URL.
        Note: Better than the --stop-on-copy trick, since it doesn't
        trip over renames.
      o 'svn info -rMERGED'
        Returns info about the latest revision in which a merge to a
        branch was committed. Works only with branches (i.e.,
        directories that contain [inherited] mergeinfo).
  * svn diff
      o svn diff -rMERGED:HEAD
        Shows changes on a branch that were made after the last merge.
      o svn diff -rMERGED:HEAD ^/other/branch
        As above, but shows changes since the last merge from ^/other/branch
      o svn diff ^/first/branch@MERGED ^/second/branch@MERGED
        Shows changes made on the branch between the last merges from
        ^/first/branch and ^/second/branch. This one could be tricky to
        fit into the other diff syntaxes. (Sometimes I wish we'd allowed
        more than one -r option per command.)

There are probably more scenarios where these keywords would be useful.
Incidentally, their use is not limited to directories; files are
branches, too.

Not a complete. formal proposal by any means, but I'm sure it could be
made so if we like it.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. br...@wandisco.com

Reply via email to