@Override public void merge( @NotNull SvnTarget source1, @NotNull SvnTarget source2, @NotNull File destination, @Nullable Depth depth, boolean useAncestry, boolean dryRun, boolean recordOnly, boolean force, @Nullable DiffOptions diffOptions, @Nullable ProgressTracker handler) throws VcsException { assertUrl(source1); assertUrl(source2); List<String> parameters = new ArrayList<String>(); 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); }
public long commit( File[] paths, String message, @Nullable SVNDepth depth, boolean noUnlock, boolean keepChangelist, Collection<String> changelists, Map revpropTable) throws VcsException { if (paths.length == 0) return INVALID_REVISION_NUMBER; final List<String> parameters = new ArrayList<String>(); CommandUtil.put(parameters, depth); CommandUtil.put(parameters, noUnlock, "--no-unlock"); CommandUtil.put(parameters, keepChangelist, "--keep-changelists"); CommandUtil.putChangeLists(parameters, changelists); if (revpropTable != null && !revpropTable.isEmpty()) { final Set<Map.Entry<Object, Object>> set = revpropTable.entrySet(); for (Map.Entry<Object, Object> entry : set) { parameters.add("--with-revprop"); parameters.add(entry.getKey() + "=" + entry.getValue()); } } parameters.add("-m"); parameters.add(message); // TODO: seems that sort is not necessary here Arrays.sort(paths); CommandUtil.put(parameters, paths); myCommandListener.setBaseDirectory(CommandUtil.correctUpToExistingParent(paths[0])); CommandUtil.execute( myVcs, SvnTarget.fromFile(paths[0]), SvnCommandName.ci, parameters, myCommandListener); myCommandListener.throwExceptionIfOccurred(); return validateRevisionNumber(); }
@Override public void merge( @NotNull SvnTarget source, @NotNull File destination, boolean dryRun, @Nullable DiffOptions diffOptions, @Nullable final ProgressTracker handler) throws VcsException { assertUrl(source); List<String> parameters = new ArrayList<String>(); CommandUtil.put(parameters, source); fillParameters(parameters, destination, null, dryRun, false, false, true, diffOptions); run(destination, handler, parameters); }
@Override public void merge( @NotNull SvnTarget source, @NotNull SVNRevisionRange range, @NotNull File destination, @Nullable Depth depth, boolean dryRun, boolean recordOnly, boolean force, @Nullable DiffOptions diffOptions, @Nullable ProgressTracker handler) throws VcsException { assertUrl(source); List<String> parameters = new ArrayList<String>(); parameters.add("--revision"); parameters.add(range.getStartRevision() + ":" + range.getEndRevision()); CommandUtil.put(parameters, source); fillParameters(parameters, destination, depth, dryRun, recordOnly, force, false, diffOptions); run(destination, handler, parameters); }
private static void fillParameters( @NotNull List<String> parameters, @NotNull File destination, @Nullable Depth depth, boolean dryRun, boolean recordOnly, boolean force, boolean reintegrate, @Nullable DiffOptions diffOptions) { CommandUtil.put(parameters, destination); CommandUtil.put(parameters, diffOptions); CommandUtil.put(parameters, dryRun, "--dry-run"); CommandUtil.put(parameters, depth); CommandUtil.put(parameters, force, "--force"); CommandUtil.put(parameters, recordOnly, "--record-only"); parameters.add("--accept"); parameters.add("postpone"); // deprecated for 1.8, but should be specified for previous clients CommandUtil.put(parameters, reintegrate, "--reintegrate"); }