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.ImportCommand; 36 import com.aragost.javahg.internals.AbstractCommand; 37 38 public abstract class ImportCommandFlags extends AbstractCommand { 39 40 protected ImportCommandFlags(Repository repository) { 41 super(repository); 42 } 43 44 @Override 45 public final String getCommandName() { 46 return "import"; 47 } 48 49 public static ImportCommand on(Repository repository) { 50 return new ImportCommand(repository); 51 } 52 53 /** 54 * Set the <tt>--base</tt> command line flag. 55 * 56 * @deprecated Using this flag has been deprecated in Mercurial. 57 * The flag wont go away, but there will typically be 58 * a better way to express the same thing. 59 * @see <a 60 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 61 * documentation</a> 62 * @return this instance 63 */ 64 @Deprecated 65 public ImportCommand base(String path) { 66 cmdAppend("--base", path); 67 return (ImportCommand) this; 68 } 69 70 /** 71 * Set the <tt>--force</tt> command line flag. 72 * 73 * @see <a 74 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 75 * documentation</a> 76 * @return this instance 77 */ 78 public ImportCommand force() { 79 cmdAppend("--force"); 80 return (ImportCommand) this; 81 } 82 83 /** 84 * Set the <tt>--no-commit</tt> command line flag. 85 * 86 * @see <a 87 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 88 * documentation</a> 89 * @return this instance 90 */ 91 public ImportCommand noCommit() { 92 cmdAppend("--no-commit"); 93 return (ImportCommand) this; 94 } 95 96 /** 97 * Set the <tt>--bypass</tt> command line flag. 98 * 99 * @see <a 100 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 101 * documentation</a> 102 * @return this instance 103 */ 104 public ImportCommand bypass() { 105 cmdAppend("--bypass"); 106 return (ImportCommand) this; 107 } 108 109 /** 110 * Set the <tt>--exact</tt> command line flag. 111 * 112 * @see <a 113 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 114 * documentation</a> 115 * @return this instance 116 */ 117 public ImportCommand exact() { 118 cmdAppend("--exact"); 119 return (ImportCommand) this; 120 } 121 122 /** 123 * Set the <tt>--import-branch</tt> command line flag. 124 * 125 * @see <a 126 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 127 * documentation</a> 128 * @return this instance 129 */ 130 public ImportCommand importBranch() { 131 cmdAppend("--import-branch"); 132 return (ImportCommand) 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#import">Mercurial 140 * documentation</a> 141 * @return this instance 142 */ 143 public ImportCommand message(String text) { 144 cmdAppend("--message", text); 145 return (ImportCommand) 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#import">Mercurial 153 * documentation</a> 154 * @return this instance 155 */ 156 public ImportCommand date(String date) { 157 cmdAppend("--date", date); 158 return (ImportCommand) 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#import">Mercurial 166 * documentation</a> 167 * @return this instance 168 */ 169 public ImportCommand user(String user) { 170 cmdAppend("--user", user); 171 return (ImportCommand) this; 172 } 173 174 /** 175 * Set the <tt>--similarity</tt> command line flag. 176 * 177 * @see <a 178 * href="http://www.selenic.com/mercurial/hg.1.html#import">Mercurial 179 * documentation</a> 180 * @return this instance 181 */ 182 public ImportCommand similarity(String similarity) { 183 cmdAppend("--similarity", similarity); 184 return (ImportCommand) this; 185 } 186 187 }