subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bert Huijben" <b...@qqmail.nl>
Subject RE: API accessing property diff of svn:mergeinfo
Date Wed, 06 May 2015 13:59:25 GMT


> -----Original Message-----
> From: Branko Čibej [mailto:brane@wandisco.com]
> Sent: woensdag 6 mei 2015 14:49
> To: users@subversion.apache.org
> Subject: Re: API accessing property diff of svn:mergeinfo
> 
> 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.

In AnkhSVN I usually skip the diff apis and just obtain the whole files ('svn cat FILE' 'svn
cat FILE@BASE')  and properties ('svn proplist FILE' 'svn proplist FILE@BASE) and do the calculations
myself.

That way I also have access to what is not changed.

Specifically for svn:mergeinfo you might be better of using the dedicated apis (which in many
cases contact the server), but for all other properties I would guess just obtaining the values
and explicitly apply further processing yourself is most likely far more future proof.

	Bert


Mime
View raw message