Thanks Stefan and Daniel.
Stefans answer looked easy and something I could use. I just need a command 
then to get the revision of the latest merged trunk revision. Preferably 
without the need to have a working copy, i.e. a command to query the SVN server 
directly. What should I use for that?
/Mikael

________________________________
Från: Daniel Shahaf <d...@daniel.shahaf.name>
Skickat: den 11 februari 2022 13:05
Till: Mikael Stålhammar <mikael_stalham...@hotmail.com>
Kopia: users@subversion.apache.org <users@subversion.apache.org>
Ämne: Re: List modified on a branch

Stefan Sperling wrote on Fri, 11 Feb 2022 10:57 +00:00:
> On Fri, Feb 11, 2022 at 08:29:35AM +0000, Mikael Stålhammar wrote:
>> Is there a simple command that lets you list files that have been modified 
>> and committed on a feature branch but excluding any files that are committed 
>> on the branch that are only merged from trunk (to keep the branch up-to-date 
>> with trunk). I.e. I only want to see those files that actually contain 
>> branch specific changes.
>
> Find the most recent revision where a merge from trunk to the branch occurred.
> If no such merge has occurred yet, find the revision in which the branch
> was created.
>

tl;dr: A tools/ script to do this wouldn't go amiss.

Here's pseudocode for this; it involves one easy but less-than-obvious
command and one parsing task that's encapsulated in our APIs.

[[[
svn log -r 0:HEAD --limit=1 --stop-on-copy -q -v ./ | 
parse_the_copyfrom_path_and_revision
svn propget --strict svn:mergeinfo ./ | parse_and_extract_revisions_merged_from 
$COPYFROM_PATH
if any revisions have been extracted:
  return max() of those
else:
  return $COPYFROM_REVISION
]]]

> Let's assume this was revision r100.
>
> Now you can run: svn diff --summarize ^/trunk@r100 ^/branches/mybranch

Reply via email to