subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko Čibej <br...@wandisco.com>
Subject Re: API accessing property diff of svn:mergeinfo
Date Wed, 06 May 2015 12:49:02 GMT
On 06.05.2015 14:20, Bernhard Haumacher wrote:
> Hi Branko,
>
>> On 06.05.2015 08:24, Bernhard Haumacher wrote:
>> >
>> > ... I'd
>> > like to analyze the diff of the svn:mergeinfo property (what other
>> > revisions were merged into some branch in a commit). ...
>> >
>>
>> ISVNClient.getMergeinfoLog should give you that information.
>>
>> The upcoming 1.9 release will have http://s.apache.org/pVj which allows
>> you to limit the revision range.
>>
>
> I tried out your suggestion, but it seems that it cannot be used for
> my purpose: I'm not interested in the merged revisions limited to
> those revisions that were merged from a specific merge source (for
> using the getMergeinfoLog() API, I do not have the `mergeSourceUrl`
> info):
>
> {{{
> getMergeinfoLog(Mergeinfo.LogKind kind, String pathOrUrl,
>                          Revision pegRevision, String mergeSourceUrl,
>                          Revision srcPegRevision,
>                          Revision srcStartRevision, Revision
> srcEndRevision,
>                          boolean discoverChangedPaths,
>                          Depth depth, Set<String> revProps,
>                          LogMessageCallback callback)
> }}}
>
> What I'm interested in is the combination of all merge sources plus
> merged revisions that were merged within a single commit. At the
> command line, this information can be retrieved with
>
> {{{
> svn diff --depth empty -c<rev> <url of branch>
> }}}
>
> resulting in e.g.:
>
> {{{
> Eigenschaftsänderungen: .
> ___________________________________________________________________
> Modified: svn:mergeinfo
>    Zusammengeführt /trunk:r161790
>    Zusammengeführt /branches/x:r160492
>    Zusammengeführt /branches/y:r185821
> }}}
>
> Unfortunately, I cannot access this information using javahl in a
> structured way?!

You can call ISVNClient.getMergeinfo twice with the same path and
different revisions and calculate the difference of the returned
Mergeinfo structures. That's just a hash+list intersection.

-- Brane


Mime
View raw message