source: valtobtest/subversion-1.6.2/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ConflictResult.java @ 3

Last change on this file since 3 was 3, checked in by valtob, 15 years ago

subversion source 1.6.2 as test

File size: 2.8 KB
Line 
1/**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2007 CollabNet.  All rights reserved.
5 *
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution.  The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
11 *
12 * This software consists of voluntary contributions made by many
13 * individuals.  For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
16 * @endcopyright
17 */
18
19package org.tigris.subversion.javahl;
20
21/**
22 * The result returned by the callback API used to handle conflicts
23 * encountered during merge/update/switch operations.  Includes a poor
24 * man's enum for <code>svn_wc_conflict_choice_t</code>.
25 *
26 * @since 1.5
27 */
28public class ConflictResult
29{
30    /**
31     * Nothing done to resolve the conflict; conflict remains.
32     */
33    public static final int postpone = 0;
34
35    /**
36     * Resolve the conflict by choosing the base file.
37     */
38    public static final int chooseBase = 1;
39
40    /**
41     * Resolve the conflict by choosing the incoming (repository)
42     * version of the object.
43     */
44    public static final int chooseTheirsFull = 2;
45
46    /**
47     * Resolve the conflict by choosing own (local) version of the
48     * object.
49     */
50    public static final int chooseMineFull = 3;
51
52    /**
53     * Resolve the conflict by choosing the incoming (repository)
54     * version of the object (for conflicted hunks only).
55     */
56    public static final int chooseTheirsConflict = 4;
57
58    /**
59     * Resolve the conflict by choosing own (local) version of the
60     * object (for conflicted hunks only).
61     */
62    public static final int chooseMineConflict = 5;
63
64    /**
65     * Resolve the conflict by choosing the merged object
66     * (potentially manually edited).
67     */
68    public static final int chooseMerged = 6;
69
70    /**
71     * A value corresponding to the
72     * <code>svn_wc_conflict_choice_t</code> enum.
73     */
74    private int choice;
75
76    /**
77     * The path to the result of a merge, or <code>null</code>.
78     */
79    private String mergedPath;
80
81    /**
82     * Create a new conflict result instace.
83     */
84    public ConflictResult(int choice, String mergedPath)
85    {
86      this.choice = choice;
87      this.mergedPath = mergedPath;
88    }
89
90    /**
91     * @return A value corresponding to the
92     * <code>svn_wc_conflict_choice_t</code> enum.
93     */
94    public int getChoice()
95    {
96        return choice;
97    }
98
99    /**
100     * @return The path to the result of a merge, or <code>null</code>.
101     */
102    public String getMergedPath()
103    {
104        return mergedPath;
105    }
106}
Note: See TracBrowser for help on using the repository browser.