[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: Branko Čibej <brane_at_wandisco.com>
Date: Wed, 06 May 2015 09:34:34 +0200

On 06.05.2015 08:24, Bernhard Haumacher wrote:
> Hi,
>
> I'm accessing a SVN repository from Java code using javahl. Now, I'd
> like to analyze the diff of the svn:mergeinfo property (what other
> revisions were merged into some branch in a commit). The only way I
> found doing that is using the API
>
> {{{
> org.apache.subversion.javahl.ISVNClient.diff(String target, Revision
> pegRevision, Revision startRevision,
> Revision endRevision, String relativeToDir,
> OutputStream outStream,
> Depth depth, Collection<String> changelists,
> boolean ignoreAncestry, boolean noDiffDeleted, boolean
> force,
> boolean copiesAsAdds, boolean ignoreProps, boolean
> propsOnly)
> }}}
>
> giving parameters depth=empty and propsOnly=true. When calling that
> method, I get a internationalized textual diff description forwarded
> to the given OutputStream with the following content:
>
> {{{
> Index: .
> ===================================================================
> --- . (Revision 7)
> +++ . (Revision 8)
>
> Eigenschaftsänderungen: .
> ___________________________________________________________________
> Added: svn:mergeinfo
> Zusammengeführt /branches/branch1/module1:r7
> }}}
>
> While this might be OK for a human reader, it seems not to be the
> normative way to access this information from progam code. Is there a
> better API that gives me the same information in a structured way,
> e.g. as map from path to revision range?

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.

-- Brane
Received on 2015-05-06 09:35:56 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.