001package org.apache.maven.scm.provider.hg.command;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022
023/**
024 * Available/Used hg commands.
025 * <p/>
026 * These commands do not necessarily correspond to the SCM API.
027 * Eg. "check in" is translated to be "commit" and "push".
028 *
029 * @author <a href="mailto:thurner.rupert@ymono.net">thurner rupert</a>
030 */
031public final class HgCommandConstants
032{
033
034    private HgCommandConstants()
035    {
036        // no o
037    }
038
039    /**
040     * Executable for Hg
041     */
042    public static final String EXEC = "hg";
043
044    /**
045     * Use to create an empty branch or before importing an existing project
046     */
047    public static final String INIT_CMD = "init";
048
049    /**
050     * Default recursive. Common option: --dry-run and --no-recursive
051     */
052    public static final String ADD_CMD = "add";
053
054    /**
055     * Reports the following states: added, removed, modified, unchanged, unknown
056     */
057    public static final String STATUS_CMD = "status";
058
059    /**
060     * Make a file unversioned
061     */
062    public static final String REMOVE_CMD = "remove";
063
064    /**
065     * Create a new copy of a branch. Alias get or clone
066     */
067    public static final String CLONE_CMD = "clone";
068
069    /**
070     * Create a new branch in the repo.
071     */
072    public static final String BRANCH_CMD = "branch";
073
074    /**
075     * Commit changes into a new revision
076     */
077    public static final String COMMIT_CMD = "commit";
078
079    /**
080     * update working-copy to tip
081     */
082    public static final String UPDATE_CMD = "update";
083
084    /**
085     * Pull any changes from another branch into the current one
086     */
087    public static final String PULL_CMD = "pull";
088
089    /**
090     * Show log of this branch Common option: --revision
091     */
092    public static final String LOG_CMD = "log";
093
094    /**
095     * Show differences in workingtree. Common option: --revision
096     */
097    public static final String DIFF_CMD = "diff";
098
099    /**
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}"
168            + "\ntag:         {tags}\nfiles:       {files}\ndescription:\n{desc}\n";
169
170}