001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.maven.scm.provider.hg.command; 020 021/** 022 * Available/Used hg commands. 023 * <p> 024 * These commands do not necessarily correspond to the SCM API. 025 * Eg. "check in" is translated to be "commit" and "push". 026 * 027 * @author <a href="mailto:thurner.rupert@ymono.net">thurner rupert</a> 028 */ 029public final class HgCommandConstants { 030 031 private HgCommandConstants() { 032 // no o 033 } 034 035 /** 036 * Executable for Hg 037 */ 038 public static final String EXEC = "hg"; 039 040 /** 041 * Use to create an empty branch or before importing an existing project 042 */ 043 public static final String INIT_CMD = "init"; 044 045 /** 046 * Default recursive. Common option: --dry-run and --no-recursive 047 */ 048 public static final String ADD_CMD = "add"; 049 050 /** 051 * Reports the following states: added, removed, modified, unchanged, unknown 052 */ 053 public static final String STATUS_CMD = "status"; 054 055 /** 056 * Make a file unversioned 057 */ 058 public static final String REMOVE_CMD = "remove"; 059 060 /** 061 * Create a new copy of a branch. Alias get or clone 062 */ 063 public static final String CLONE_CMD = "clone"; 064 065 /** 066 * Create a new branch in the repo. 067 */ 068 public static final String BRANCH_CMD = "branch"; 069 070 /** 071 * Commit changes into a new revision 072 */ 073 public static final String COMMIT_CMD = "commit"; 074 075 /** 076 * update working-copy to tip 077 */ 078 public static final String UPDATE_CMD = "update"; 079 080 /** 081 * Pull any changes from another branch into the current one 082 */ 083 public static final String PULL_CMD = "pull"; 084 085 /** 086 * Show log of this branch Common option: --revision 087 */ 088 public static final String LOG_CMD = "log"; 089 090 /** 091 * Show differences in workingtree. Common option: --revision 092 */ 093 public static final String DIFF_CMD = "diff"; 094 095 /** 096 * Push this branch into another branch 097 */ 098 public static final String PUSH_CMD = "push"; 099 100 /** 101 * Show current revision number 102 */ 103 public static final String REVNO_CMD = "id"; 104 105 /** 106 * Tag this revision 107 */ 108 public static final String TAG_CMD = "tag"; 109 110 /** 111 * Show list of the current working copy or a revision 112 */ 113 public static final String INVENTORY_CMD = "locate"; 114 115 /** 116 * Outgoing changes command 117 */ 118 public static final String OUTGOING_CMD = "outgoing"; 119 120 /** 121 * Named branch command 122 */ 123 public static final String BRANCH_NAME_CMD = "branch"; 124 125 /** 126 * no recurse option does not exist in mercurial 127 */ 128 public static final String NO_RECURSE_OPTION = ""; 129 130 public static final String MESSAGE_OPTION = "--message"; 131 132 public static final String REVISION_OPTION = "-r"; 133 134 public static final String DATE_OPTION = "--date"; 135 136 public static final String VERBOSE_OPTION = "--verbose"; 137 138 public static final String NO_MERGES_OPTION = "--no-merges"; 139 140 public static final String VERSION = "version"; 141 142 public static final String CHECK = "check"; 143 144 public static final String ALL_OPTION = "-A"; 145 146 public static final String NEW_BRANCH_OPTION = "--new-branch"; 147 148 public static final String CLEAN_OPTION = "-c"; 149 150 public static final String TEMPLATE_OPTION = "--template"; 151 152 /** 153 * limit number of changes displayed 154 */ 155 public static final String LIMIT_OPTION = "--limit"; 156 157 /** 158 * A template for the log output in order to decouple the date parsing from 159 * system and java locale, also helps avoiding bug due changes on the 160 * verbose format for log command. 161 */ 162 public static final String TEMPLATE_FORMAT = 163 "changeset: {rev}:{node|short}\\nbranch: {branch}\\nuser: {author}\\n" 164 + "date: {date|isodatesec}\\ntag: {tags}\\nfiles: {files}\\ndescription:\\n{desc}\\n"; 165}