Hello,

There is an implementation of Subversion command line client in SVNKit
and its merge command creates the following range when -c revNum is
specified:

SVNRevisionRange rangeToMerge = new
SVNRevisionRange(SVNRevision.create(revision.getNumber() -1),
revision);

This should work. You said you get conflicts which you do not get when
running the same command from the command line. Is that correct? What
are other arguments you pass to the doMerge(...) method?

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://hg4j.com/ - Java Mercurial Library!
http://sqljet.com/ - Java SQLite Library!



On 4 October 2011 18:31, randal cobb <[email protected]> wrote:
> Hello all,
> Apologies if this is a duplicate post... I think my work email is treating
> the mailing list as spam and not sending my emails to the list (at least I'm
> not seeing any replies to them or nothing in the Nabble list mirror), so I'm
> sending from a different account.
> I'm struggling either with which method of doMerge to use, or with the
> proper construction of an SVNRevisionRange object to pass to this syntax of
> the doMerge method:
> diffClient.doMerge(url, SVNRevision.HEAD,
> Collections.singleton(rangeToMerge), target, SVNDepth.UNKNOWN, true, false,
> true, false);
> I'm trying to merge in a single "eligible" revision number to my target.
>  I've tried to construct my SVNRevision range in these three (3) ways; all
> with similar results (revision argument is a proper SVNRevision object):
> Using the same revision:
> SVNRevisionRange rangeToMerge = new SVNRevisionRange(revision, revision);
> Using a previous revision as the first revision:
> SVNRevisionRange rangeToMerge = new
> SVNRevisionRange(SVNRevision.create(revision.getNumber() -1), revision);
> And using the next revision as the second revision:
> SVNRevisionRange rangeToMerge = new SVNRevisionRange(revision,
> SVNRevision.create(revision.getNumber() +1));
> In the first case, I get nothing at all merged and I've confirmed that there
> ARE changes in that revision that are indeed eligible to merge.  In the
> second case, I get an edit conflict even though a conflict really shouldn't
> happen.  In the third case, I get the change I want, but I then get a
> conflict on the second revision merged in; just like the second scenario.
> I know I have to be doing something wrong, but I'm just really learning and
> can't seem to find what I'm doing wrong either via Googling or from the
> JavaDocs and/or examples.
> How is the best way to merge in just a single revision?
> Thanks in advance!
> Randy

Reply via email to