mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'svn_18_2'
This commit is contained in:
@@ -91,8 +91,8 @@ public class BranchMerger implements IMerger {
|
||||
client.merge(SvnTarget.fromURL(mySourceUrl), destination, false, createDiffOptions(), myHandler);
|
||||
} else {
|
||||
client.merge(SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceCopyRevision)),
|
||||
SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceLatestRevision)), destination, SVNDepth.INFINITY, false, false,
|
||||
true, createDiffOptions(), myHandler);
|
||||
SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceLatestRevision)), destination, SVNDepth.INFINITY, true, false,
|
||||
false, true, createDiffOptions(), myHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ public class CmdMergeClient extends BaseSvnClient implements MergeClient {
|
||||
@NotNull SvnTarget source2,
|
||||
@NotNull File destination,
|
||||
@Nullable SVNDepth depth,
|
||||
boolean useAncestry,
|
||||
boolean dryRun,
|
||||
boolean recordOnly,
|
||||
boolean force,
|
||||
@@ -74,6 +75,7 @@ public class CmdMergeClient extends BaseSvnClient implements MergeClient {
|
||||
CommandUtil.put(parameters, source1);
|
||||
CommandUtil.put(parameters, source2);
|
||||
fillParameters(parameters, destination, depth, dryRun, recordOnly, force, false, diffOptions);
|
||||
CommandUtil.put(parameters, !useAncestry, "--ignore-ancestry");
|
||||
|
||||
run(destination, handler, parameters);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ public interface MergeClient extends SvnClient {
|
||||
@NotNull SvnTarget source2,
|
||||
@NotNull File destination,
|
||||
@Nullable SVNDepth depth,
|
||||
boolean useAncestry,
|
||||
boolean dryRun,
|
||||
boolean recordOnly,
|
||||
boolean force,
|
||||
|
||||
@@ -88,7 +88,8 @@ public class PointMerger extends Merger {
|
||||
SvnTarget source1 = SvnTarget.fromURL(SVNURL.parseURIEncoded(beforeUrl), ((SvnRevisionNumber)before.getRevisionNumber()).getRevision());
|
||||
SvnTarget source2 = SvnTarget.fromURL(SVNURL.parseURIEncoded(afterUrl), ((SvnRevisionNumber) after.getRevisionNumber()).getRevision());
|
||||
|
||||
client.merge(source1, source2, afterPath, SVNDepth.FILES, mySvnConfig.MERGE_DRY_RUN, false, false, mySvnConfig.getMergeOptions(), myHandler);
|
||||
client.merge(source1, source2, afterPath, SVNDepth.FILES, true, mySvnConfig.MERGE_DRY_RUN, false, false, mySvnConfig.getMergeOptions(),
|
||||
myHandler);
|
||||
}
|
||||
|
||||
private void delete(final Change change) throws SVNException, VcsException {
|
||||
|
||||
@@ -61,6 +61,7 @@ public class SvnKitMergeClient extends BaseSvnClient implements MergeClient {
|
||||
@NotNull SvnTarget source2,
|
||||
@NotNull File destination,
|
||||
@Nullable SVNDepth depth,
|
||||
boolean useAncestry,
|
||||
boolean dryRun,
|
||||
boolean recordOnly,
|
||||
boolean force,
|
||||
@@ -71,7 +72,7 @@ public class SvnKitMergeClient extends BaseSvnClient implements MergeClient {
|
||||
|
||||
try {
|
||||
createClient(diffOptions, handler).doMerge(source1.getURL(), source1.getPegRevision(), source2.getURL(), source2.getPegRevision(),
|
||||
destination, depth, true, force, dryRun, recordOnly);
|
||||
destination, depth, useAncestry, force, dryRun, recordOnly);
|
||||
}
|
||||
catch (SVNException e) {
|
||||
throw new VcsException(e);
|
||||
|
||||
+5
-1
@@ -69,11 +69,15 @@ public abstract class AbstractUpdateIntegrateCrawler implements SvnWCRootCrawler
|
||||
LOG.info(e);
|
||||
myExceptions.add(new VcsException(e));
|
||||
}
|
||||
catch (VcsException e) {
|
||||
LOG.info(e);
|
||||
myExceptions.add(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void showProgressMessage(ProgressIndicator progress, File root);
|
||||
|
||||
protected abstract long doUpdate(File root) throws SVNException;
|
||||
protected abstract long doUpdate(File root) throws SVNException, VcsException;
|
||||
|
||||
protected abstract boolean isMerge();
|
||||
}
|
||||
|
||||
@@ -24,11 +24,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
import org.jetbrains.idea.svn.SvnConfiguration;
|
||||
import org.jetbrains.idea.svn.SvnVcs;
|
||||
import org.jetbrains.idea.svn.integrate.MergeClient;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
import org.tmatesoft.svn.core.SVNURL;
|
||||
import org.tmatesoft.svn.core.io.SVNRepository;
|
||||
import org.tmatesoft.svn.core.wc.SVNDiffClient;
|
||||
import org.tmatesoft.svn.core.wc.SVNRevision;
|
||||
import org.tmatesoft.svn.core.wc2.SvnTarget;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -90,7 +91,7 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
|
||||
}
|
||||
}
|
||||
|
||||
protected long doUpdate(final File root) throws SVNException {
|
||||
protected long doUpdate(final File root) throws VcsException {
|
||||
final SvnConfiguration svnConfig = SvnConfiguration.getInstance(myVcs.getProject());
|
||||
|
||||
MergeRootInfo info = svnConfig.getMergeRootInfo(root, myVcs);
|
||||
@@ -99,12 +100,12 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
|
||||
return 0;
|
||||
}
|
||||
|
||||
SVNDiffClient diffClient = myVcs.createDiffClient();
|
||||
diffClient.setEventHandler(myHandler);
|
||||
diffClient.doMerge(info.getUrl1(), info.getRevision1(),
|
||||
info.getUrl2(), info.getRevision2(), root,
|
||||
svnConfig.UPDATE_DEPTH, svnConfig.MERGE_DIFF_USE_ANCESTRY, false, svnConfig.MERGE_DRY_RUN, false);
|
||||
MergeClient client = myVcs.getFactory(root).createMergeClient();
|
||||
SvnTarget source1 = SvnTarget.fromURL(info.getUrl1(), info.getRevision1());
|
||||
SvnTarget source2 = SvnTarget.fromURL(info.getUrl2(), info.getRevision2());
|
||||
|
||||
client.merge(source1, source2, root, svnConfig.UPDATE_DEPTH, svnConfig.MERGE_DIFF_USE_ANCESTRY, svnConfig.MERGE_DRY_RUN, false, false,
|
||||
svnConfig.getMergeOptions(), myHandler);
|
||||
svnConfig.LAST_MERGED_REVISION = getLastMergedRevision(info.getRevision2(), info.getUrl2());
|
||||
return info.getResultRevision();
|
||||
}
|
||||
@@ -126,6 +127,7 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
|
||||
}
|
||||
else {
|
||||
|
||||
// TODO: Rewrite with command line implementation
|
||||
SVNRepository repos = null;
|
||||
try {
|
||||
repos = myVcs.createRepository(svnURL2.toString());
|
||||
|
||||
Reference in New Issue
Block a user