[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: API accessing property diff of svn:mergeinfo

From: Mark Phippard <markphip_at_gmail.com>
Date: Wed, 6 May 2015 10:41:39 -0400

On Wed, May 6, 2015 at 8:20 AM, Bernhard Haumacher <haui_at_haumacher.de>
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 are right that you could do this, but I do not think we would generally
tell someone to do this. The fact that we expose the mergeinfo as a
property is an implementation side effect. The way we would tell someone
to do what you ask is this:

$ svn log -g -c<rev> <url of branch>

$ svn log -gq -c1674434
http://svn.apache.org/repos/asf/subversion/branches/1.9.x
------------------------------------------------------------------------
r1674434 | svn-role | 2015-04-18 00:00:19 -0400 (Sat, 18 Apr 2015)
------------------------------------------------------------------------
r1674267 | philip | 2015-04-17 06:31:27 -0400 (Fri, 17 Apr 2015)
Merged via: r1674434
------------------------------------------------------------------------
r1664674 | rhuijben | 2015-03-06 11:17:04 -0500 (Fri, 06 Mar 2015)
Merged via: r1674434, r1674267
------------------------------------------------------------------------
r1664672 | rhuijben | 2015-03-06 11:00:15 -0500 (Fri, 06 Mar 2015)
Merged via: r1674434, r1674267
------------------------------------------------------------------------
r1664664 | rhuijben | 2015-03-06 10:48:06 -0500 (Fri, 06 Mar 2015)
Merged via: r1674434, r1674267
------------------------------------------------------------------------
r1674265 | philip | 2015-04-17 06:26:38 -0400 (Fri, 17 Apr 2015)
Merged via: r1674434
------------------------------------------------------------------------

For reference:

$ svn diff --depth=empty -c1674434
http://svn.apache.org/repos/asf/subversion/branches/1.9.x
Index: .
===================================================================
--- . (revision 1674433)
+++ . (revision 1674434)

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /subversion/branches/1.9.x-r1664664:r1674265-1674433
   Merged /subversion/trunk:r1664664,1664672,1664674

From JavaHL that would be the ISVNClient.logMessages method with the
includeMergedRevisions boolean set to true, with other booleans that
control how much information you want to receive about each of the various
revisions.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2015-05-06 16:43:38 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.