~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @copyright
 
3
 * ====================================================================
 
4
 *    Licensed to the Apache Software Foundation (ASF) under one
 
5
 *    or more contributor license agreements.  See the NOTICE file
 
6
 *    distributed with this work for additional information
 
7
 *    regarding copyright ownership.  The ASF licenses this file
 
8
 *    to you under the Apache License, Version 2.0 (the
 
9
 *    "License"); you may not use this file except in compliance
 
10
 *    with the License.  You may obtain a copy of the License at
 
11
 *
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 *
 
14
 *    Unless required by applicable law or agreed to in writing,
 
15
 *    software distributed under the License is distributed on an
 
16
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
17
 *    KIND, either express or implied.  See the License for the
 
18
 *    specific language governing permissions and limitations
 
19
 *    under the License.
 
20
 * ====================================================================
 
21
 * @endcopyright
 
22
 */
 
23
 
 
24
package org.apache.subversion.javahl;
 
25
 
 
26
/**
 
27
 * The result returned by the callback API used to handle conflicts
 
28
 * encountered during merge/update/switch operations.  Includes a poor
 
29
 * man's enum for <code>svn_wc_conflict_choice_t</code>.
 
30
 */
 
31
public class ConflictResult
 
32
{
 
33
    /**
 
34
     * A value corresponding to the
 
35
     * <code>svn_wc_conflict_choice_t</code> enum.
 
36
     */
 
37
    private Choice choice;
 
38
 
 
39
    /**
 
40
     * The path to the result of a merge, or <code>null</code>.
 
41
     */
 
42
    private String mergedPath;
 
43
 
 
44
    /**
 
45
     * Create a new conflict result instace.
 
46
     */
 
47
    public ConflictResult(Choice choice, String mergedPath)
 
48
    {
 
49
      this.choice = choice;
 
50
      this.mergedPath = mergedPath;
 
51
    }
 
52
 
 
53
    /**
 
54
     * @return A value corresponding to the
 
55
     * <code>svn_wc_conflict_choice_t</code> enum.
 
56
     */
 
57
    public Choice getChoice()
 
58
    {
 
59
        return choice;
 
60
    }
 
61
 
 
62
    /**
 
63
     * @return The path to the result of a merge, or <code>null</code>.
 
64
     */
 
65
    public String getMergedPath()
 
66
    {
 
67
        return mergedPath;
 
68
    }
 
69
 
 
70
    public enum Choice
 
71
    {
 
72
        /** Nothing done to resolve the conflict; conflict remains.  */
 
73
        postpone,
 
74
 
 
75
        /** Resolve the conflict by choosing the base file.  */
 
76
        chooseBase,
 
77
 
 
78
        /**
 
79
         * Resolve the conflict by choosing the incoming (repository)
 
80
         * version of the object.
 
81
         */
 
82
        chooseTheirsFull,
 
83
 
 
84
        /**
 
85
         * Resolve the conflict by choosing own (local) version of the
 
86
         * object.
 
87
         */
 
88
        chooseMineFull,
 
89
 
 
90
        /**
 
91
         * Resolve the conflict by choosing the incoming (repository)
 
92
         * version of the object (for conflicted hunks only).
 
93
         */
 
94
        chooseTheirsConflict,
 
95
 
 
96
        /**
 
97
         * Resolve the conflict by choosing own (local) version of the
 
98
         * object (for conflicted hunks only).
 
99
         */
 
100
        chooseMineConflict,
 
101
 
 
102
        /**
 
103
         * Resolve the conflict by choosing the merged object
 
104
         * (potentially manually edited).
 
105
         */
 
106
        chooseMerged;
 
107
    }
 
108
}