001 package 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 * @version $Id: HgCommandConstants.java 1352832 2012-06-22 10:22:25Z olamy $ 031 */ 032 public final class HgCommandConstants 033 { 034 035 private HgCommandConstants() 036 { 037 // no o 038 } 039 040 /** 041 * Executable for Hg 042 */ 043 public static final String EXEC = "hg"; 044 045 /** 046 * Use to create an empty branch or before importing an existing project 047 */ 048 public static final String INIT_CMD = "init"; 049 050 /** 051 * Default recursive. Common option: --dry-run and --no-recursive 052 */ 053 public static final String ADD_CMD = "add"; 054 055 /** 056 * Reports the following states: added, removed, modified, unchanged, unknown 057 */ 058 public static final String STATUS_CMD = "status"; 059 060 /** 061 * Make a file unversioned 062 */ 063 public static final String REMOVE_CMD = "remove"; 064 065 /** 066 * Create a new copy of a branch. Alias get or clone 067 */ 068 public static final String CLONE_CMD = "clone"; 069 070 /** 071 * Create a new branch in the repo. 072 */ 073 public static final String BRANCH_CMD = "branch"; 074 075 /** 076 * Commit changes into a new revision 077 */ 078 public static final String COMMIT_CMD = "commit"; 079 080 /** 081 * update working-copy to tip 082 */ 083 public static final String UPDATE_CMD = "update"; 084 085 /** 086 * Pull any changes from another branch into the current one 087 */ 088 public static final String PULL_CMD = "pull"; 089 090 /** 091 * Show log of this branch Common option: --revision 092 */ 093 public static final String LOG_CMD = "log"; 094 095 /** 096 * Show differences in workingtree. Common option: --revision 097 */ 098 public static final String DIFF_CMD = "diff"; 099 100 /** 101 * Push this branch into another branch 102 */ 103 public static final String PUSH_CMD = "push"; 104 105 /** 106 * Show current revision number 107 */ 108 public static final String REVNO_CMD = "id"; 109 110 /** 111 * Tag this revision 112 */ 113 public static final String TAG_CMD = "tag"; 114 115 /** 116 * Show list of the current working copy or a revision 117 */ 118 public static final String INVENTORY_CMD = "locate"; 119 120 /** 121 * Outgoing changes command 122 */ 123 public static final String OUTGOING_CMD = "outgoing"; 124 125 /** 126 * Named branch command 127 */ 128 public static final String BRANCH_NAME_CMD = "branch"; 129 130 /** 131 * no recurse option does not exist in mercurial 132 */ 133 public static final String NO_RECURSE_OPTION = ""; 134 135 public static final String MESSAGE_OPTION = "--message"; 136 137 public static final String REVISION_OPTION = "-r"; 138 139 public static final String DATE_OPTION = "--date"; 140 141 public static final String VERBOSE_OPTION = "--verbose"; 142 143 public static final String NO_MERGES_OPTION = "--no-merges"; 144 145 public static final String VERSION = "version"; 146 147 public static final String CHECK = "check"; 148 149 public static final String ALL_OPTION = "-A"; 150 151 public static final String NEW_BRANCH_OPTION = "--new-branch"; 152 153 public static final String CLEAN_OPTION = "-c"; 154 155 /** 156 * limit number of changes displayed 157 */ 158 public static final String LIMIT_OPTION = "--limit"; 159 160 /** 161 * A template for the log output in order to decouple the date parsing from 162 * system and java locale, also helps avoiding bug due changes on the 163 * verbose format for log command. 164 */ 165 public static final String TEMPLATE_OPTION = "--template \"changeset: {rev}:{node|short}\nbranch: {branch}\nuser: {author}\ndate: {date|isodatesec}\ntag: {tags}\nfiles: {files}\ndescription:\n{desc}\n\n\""; 166 167 168 }