01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.core.wc;
13:
14: import java.io.File;
15: import java.io.OutputStream;
16:
17: import org.tmatesoft.svn.core.SVNException;
18:
19: /**
20: * <b>ISVNMerger</b> is the merger driver interface used by SVNKit in
21: * merging operations.
22: *
23: * <p>
24: * Merger drivers are created by a merger factory implementing the
25: * {@link ISVNMergerFactory} interface. Read more about that interface to
26: * find out how to get a default implementation of <b>ISVNMerger</b>.
27: *
28: * @version 1.1.1
29: * @author TMate Software Ltd.
30: */
31: public interface ISVNMerger {
32:
33: /**
34: * Generates deltas given the two text source files to be compared, applies
35: * the deltas against a local file and writes the merge result to the
36: * given {@link java.io.OutputStream}.
37: *
38: * @param baseFile the earliest file of the two to be compared to
39: * generate delta
40: * @param localFile a local WC file against which the delta
41: * should be applied
42: * @param latestFile the latest file of the two to be compared to
43: * generate delta
44: * @param dryRun if <span class="javakeyword">true</span> - only
45: * try to merge (to find out if an operation can succeed)
46: * without actual merging
47: * @param options diff options to apply
48: * @param out an output stream where the result file contents
49: * should be written to
50: * @return a result status of the operation; if success -
51: * returns {@link SVNStatusType#MERGED}
52: * @throws SVNException
53: */
54: public SVNStatusType mergeText(File baseFile, File localFile,
55: File latestFile, boolean dryRun, SVNDiffOptions options,
56: OutputStream out) throws SVNException;
57:
58: /**
59: * Generates deltas given two binary files, applies
60: * the deltas against a local file and writes the merge result to the
61: * given {@link java.io.OutputStream}.
62: *
63: * @param baseFile the earliest file of the two to generate deltas
64: * @param localFile a local WC file against which the deltas
65: * should be applied
66: * @param latestFile the latest file of the two to generate deltas
67: * @param dryRun if <span class="javakeyword">true</span> - only
68: * try to merge (to find out if an operation can succeed)
69: * without actual merging
70: * @param out an output stream where the result file contents
71: * should be written to
72: * @return a result status of the operation; if success -
73: * returns {@link SVNStatusType#MERGED}
74: * @throws SVNException
75: */
76: public SVNStatusType mergeBinary(File baseFile, File localFile,
77: File latestFile, boolean dryRun, OutputStream out)
78: throws SVNException;
79: }
|