Coverage Report - com.aragost.javahg.commands.flags.CommitCommandFlags
 
Classes in this File Line Coverage Branch Coverage Complexity
CommitCommandFlags
66%
12/18
N/A
1
 
 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.DateTime;
 35  
 
 36  
 import com.aragost.javahg.Repository;
 37  
 import com.aragost.javahg.commands.CommitCommand;
 38  
 import com.aragost.javahg.internals.AbstractCommand;
 39  
 
 40  
 public abstract class CommitCommandFlags extends AbstractCommand {
 41  
 
 42  
     protected CommitCommandFlags(Repository repository) {
 43  949
         super(repository);
 44  949
     }
 45  
 
 46  
     @Override
 47  
     public final String getCommandName() {
 48  2663
         return "commit";
 49  
     }
 50  
 
 51  
     public static CommitCommand on(Repository repository) {
 52  949
         return new CommitCommand(repository);
 53  
     }
 54  
 
 55  
     /**
 56  
      * Set the <tt>--close-branch</tt> command line flag.
 57  
      * 
 58  
      * @see <a
 59  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 60  
      *      documentation</a>
 61  
      * @return this instance
 62  
      */
 63  
     public CommitCommand closeBranch() {
 64  3
         cmdAppend("--close-branch");
 65  3
         return (CommitCommand) this;
 66  
     }
 67  
 
 68  
     /**
 69  
      * Set the <tt>--amend</tt> command line flag.
 70  
      * 
 71  
      * @see <a
 72  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 73  
      *      documentation</a>
 74  
      * @return this instance
 75  
      */
 76  
     public CommitCommand amend() {
 77  0
         cmdAppend("--amend");
 78  0
         return (CommitCommand) this;
 79  
     }
 80  
 
 81  
     /**
 82  
      * Set the <tt>--include</tt> command line flag.
 83  
      * 
 84  
      * @see <a
 85  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 86  
      *      documentation</a>
 87  
      * @return this instance
 88  
      */
 89  
     public CommitCommand include(String... patterns) {
 90  0
         cmdAppend("--include", patterns);
 91  0
         return (CommitCommand) this;
 92  
     }
 93  
 
 94  
     /**
 95  
      * Set the <tt>--exclude</tt> command line flag.
 96  
      * 
 97  
      * @see <a
 98  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 99  
      *      documentation</a>
 100  
      * @return this instance
 101  
      */
 102  
     public CommitCommand exclude(String... patterns) {
 103  0
         cmdAppend("--exclude", patterns);
 104  0
         return (CommitCommand) this;
 105  
     }
 106  
 
 107  
     /**
 108  
      * Set the <tt>--message</tt> command line flag.
 109  
      * 
 110  
      * @see <a
 111  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 112  
      *      documentation</a>
 113  
      * @return this instance
 114  
      */
 115  
     public CommitCommand message(String text) {
 116  947
         cmdAppend("--message", text);
 117  946
         return (CommitCommand) this;
 118  
     }
 119  
 
 120  
     /**
 121  
      * Set the <tt>--date</tt> command line flag.
 122  
      * 
 123  
      * @see <a
 124  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 125  
      *      documentation</a>
 126  
      * @return this instance
 127  
      */
 128  
     public CommitCommand date(DateTime date) {
 129  6
         cmdAppend("--date", date);
 130  5
         return (CommitCommand) this;
 131  
     }
 132  
 
 133  
     /**
 134  
      * Set the <tt>--user</tt> command line flag.
 135  
      * 
 136  
      * @see <a
 137  
      *      href="http://www.selenic.com/mercurial/hg.1.html#commit">Mercurial
 138  
      *      documentation</a>
 139  
      * @return this instance
 140  
      */
 141  
     public CommitCommand user(String user) {
 142  945
         cmdAppend("--user", user);
 143  945
         return (CommitCommand) this;
 144  
     }
 145  
 
 146  
 }