1 /*
2 * #%L
3 * JavaHg
4 * %%
5 * Copyright (C) 2011 aragost Trifork ag
6 * %%
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 * #L%
25 */
26
27 /*
28 * Automatically generated based on Mercurial 2.2.1.
29 *
30 * Don't edit this file! Edit scripts/generate-flag-classes.py instead.
31 */
32 package com.aragost.javahg.commands.flags;
33
34 import com.aragost.javahg.Repository;
35 import com.aragost.javahg.commands.BackoutCommand;
36 import com.aragost.javahg.internals.AbstractCommand;
37
38 public abstract class BackoutCommandFlags extends AbstractCommand {
39
40 protected BackoutCommandFlags(Repository repository) {
41 super(repository);
42 }
43
44 @Override
45 public final String getCommandName() {
46 return "backout";
47 }
48
49 public static BackoutCommand on(Repository repository) {
50 return new BackoutCommand(repository);
51 }
52
53 /**
54 * Set the <tt>--merge</tt> command line flag.
55 *
56 * @see <a
57 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
58 * documentation</a>
59 * @return this instance
60 */
61 public BackoutCommand merge() {
62 cmdAppend("--merge");
63 return (BackoutCommand) this;
64 }
65
66 /**
67 * Set the <tt>--parent</tt> command line flag.
68 *
69 * @deprecated Using this flag has been deprecated in Mercurial.
70 * The flag wont go away, but there will typically be
71 * a better way to express the same thing.
72 * @see <a
73 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
74 * documentation</a>
75 * @return this instance
76 */
77 @Deprecated
78 public BackoutCommand parent(String rev) {
79 cmdAppend("--parent", rev);
80 return (BackoutCommand) this;
81 }
82
83 /**
84 * Set the <tt>--rev</tt> command line flag.
85 *
86 * @see <a
87 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
88 * documentation</a>
89 * @return this instance
90 */
91 public BackoutCommand rev(String rev) {
92 cmdAppend("--rev", rev);
93 return (BackoutCommand) this;
94 }
95
96 /**
97 * Set the <tt>--tool</tt> command line flag.
98 *
99 * @see <a
100 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
101 * documentation</a>
102 * @return this instance
103 */
104 public BackoutCommand tool(String value) {
105 cmdAppend("--tool", value);
106 return (BackoutCommand) this;
107 }
108
109 /**
110 * Set the <tt>--include</tt> command line flag.
111 *
112 * @see <a
113 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
114 * documentation</a>
115 * @return this instance
116 */
117 public BackoutCommand include(String... patterns) {
118 cmdAppend("--include", patterns);
119 return (BackoutCommand) this;
120 }
121
122 /**
123 * Set the <tt>--exclude</tt> command line flag.
124 *
125 * @see <a
126 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
127 * documentation</a>
128 * @return this instance
129 */
130 public BackoutCommand exclude(String... patterns) {
131 cmdAppend("--exclude", patterns);
132 return (BackoutCommand) this;
133 }
134
135 /**
136 * Set the <tt>--message</tt> command line flag.
137 *
138 * @see <a
139 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
140 * documentation</a>
141 * @return this instance
142 */
143 public BackoutCommand message(String text) {
144 cmdAppend("--message", text);
145 return (BackoutCommand) this;
146 }
147
148 /**
149 * Set the <tt>--date</tt> command line flag.
150 *
151 * @see <a
152 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
153 * documentation</a>
154 * @return this instance
155 */
156 public BackoutCommand date(String date) {
157 cmdAppend("--date", date);
158 return (BackoutCommand) this;
159 }
160
161 /**
162 * Set the <tt>--user</tt> command line flag.
163 *
164 * @see <a
165 * href="http://www.selenic.com/mercurial/hg.1.html#backout">Mercurial
166 * documentation</a>
167 * @return this instance
168 */
169 public BackoutCommand user(String user) {
170 cmdAppend("--user", user);
171 return (BackoutCommand) this;
172 }
173
174 }