View Javadoc

1   package org.apache.maven.scm.provider.hg.command;
2   
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  
22  
23  /**
24   * Available/Used hg commands.
25   * <p/>
26   * These commands do not necessarily correspond to the SCM API.
27   * Eg. "check in" is translated to be "commit" and "push".
28   *
29   * @author <a href="mailto:thurner.rupert@ymono.net">thurner rupert</a>
30   */
31  public final class HgCommandConstants
32  {
33  
34      private HgCommandConstants()
35      {
36          // no o
37      }
38  
39      /**
40       * Executable for Hg
41       */
42      public static final String EXEC = "hg";
43  
44      /**
45       * Use to create an empty branch or before importing an existing project
46       */
47      public static final String INIT_CMD = "init";
48  
49      /**
50       * Default recursive. Common option: --dry-run and --no-recursive
51       */
52      public static final String ADD_CMD = "add";
53  
54      /**
55       * Reports the following states: added, removed, modified, unchanged, unknown
56       */
57      public static final String STATUS_CMD = "status";
58  
59      /**
60       * Make a file unversioned
61       */
62      public static final String REMOVE_CMD = "remove";
63  
64      /**
65       * Create a new copy of a branch. Alias get or clone
66       */
67      public static final String CLONE_CMD = "clone";
68  
69      /**
70       * Create a new branch in the repo.
71       */
72      public static final String BRANCH_CMD = "branch";
73  
74      /**
75       * Commit changes into a new revision
76       */
77      public static final String COMMIT_CMD = "commit";
78  
79      /**
80       * update working-copy to tip
81       */
82      public static final String UPDATE_CMD = "update";
83  
84      /**
85       * Pull any changes from another branch into the current one
86       */
87      public static final String PULL_CMD = "pull";
88  
89      /**
90       * Show log of this branch Common option: --revision
91       */
92      public static final String LOG_CMD = "log";
93  
94      /**
95       * Show differences in workingtree. Common option: --revision
96       */
97      public static final String DIFF_CMD = "diff";
98  
99      /**
100      * Push this branch into another branch
101      */
102     public static final String PUSH_CMD = "push";
103 
104     /**
105      * Show current revision number
106      */
107     public static final String REVNO_CMD = "id";
108 
109     /**
110      * Tag this revision
111      */
112     public static final String TAG_CMD = "tag";
113 
114     /**
115      * Show list of the current working copy or a revision
116      */
117     public static final String INVENTORY_CMD = "locate";
118 
119     /**
120      * Outgoing changes command
121      */
122     public static final String OUTGOING_CMD = "outgoing";
123 
124     /**
125      * Named branch command
126      */
127     public static final String BRANCH_NAME_CMD = "branch";
128 
129     /**
130      * no recurse option does not exist in mercurial
131      */
132     public static final String NO_RECURSE_OPTION = "";
133 
134     public static final String MESSAGE_OPTION = "--message";
135 
136     public static final String REVISION_OPTION = "-r";
137 
138     public static final String DATE_OPTION = "--date";
139 
140     public static final String VERBOSE_OPTION = "--verbose";
141 
142     public static final String NO_MERGES_OPTION = "--no-merges";
143 
144     public static final String VERSION = "version";
145 
146     public static final String CHECK = "check";
147 
148     public static final String ALL_OPTION = "-A";
149 
150     public static final String NEW_BRANCH_OPTION = "--new-branch";
151 
152     public static final String CLEAN_OPTION = "-c";
153 
154     public static final String TEMPLATE_OPTION = "--template";
155 
156     /**
157      * limit number of changes displayed
158      */
159     public static final String LIMIT_OPTION = "--limit";
160 
161     /**
162      * A template for the log output in order to decouple the date parsing from
163      * system and java locale, also helps avoiding bug due changes on the
164      * verbose format for log command.
165      */
166     public static final String TEMPLATE_FORMAT =
167         "changeset:   {rev}:{node|short}\nbranch:      {branch}\nuser:        {author}\ndate:        {date|isodatesec}\ntag:         {tags}\nfiles:       {files}\ndescription:\n{desc}\n";
168 
169 }