doc/hg.1.txt
author mpm@selenic.com
Fri, 27 May 2005 13:09:56 -0800
changeset 182 089594a5bbde
parent 178 b3bf5a0edd69
parent 181 038e4d8602bd
child 196 48827121af7e
permissions -rw-r--r--
Pull from Jake's hg docs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     1
HG(1)
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     2
=====
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     3
Matt Mackall <mpm@selenic.com>
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     4
v0.5, 27 May 2005
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     5
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     6
NAME
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     7
----
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     8
hg - command line interface to the Mercurial source code management system
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
     9
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    10
SYNOPSIS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    11
--------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    12
'hg' [-v -d -q -y] <command> [command options] [files]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    13
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    14
DESCRIPTION
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    15
-----------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    16
The hg(1) command provides a command line interface to the Mercurial system.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    17
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    18
NOTE
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    19
----
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    20
Many of the hg commands are not yet subdirectory and/or working directory
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    21
aware.  This means that some commands will only work in the top level 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    22
repository directory or will only accept paths and filenames relative to the
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    23
top level.  Merges and commits, in particular, should be done in the
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    24
top-level directory.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    25
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    26
OPTIONS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    27
-------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    28
--debug, -d::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    29
    enable debugging output
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    30
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    31
--quiet, -q::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    32
    suppress output
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    33
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    34
--verbose, -v::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    35
    enable additional output
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    36
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    37
--noninteractive, -y::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    38
    do not prompt, assume 'yes' for any required answers
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    39
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    40
COMMAND ELEMENTS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    41
----------------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    42
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    43
files ...::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    44
    indicates one or more filename or relative path filenames
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    45
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    46
path::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    47
    indicates a path on the local machine
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    48
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    49
revision::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    50
    indicates a changeset which can be specified as a changeset id (int),
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    51
    a tag, or a unique substring of the changeset hash value
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    52
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    53
repository path::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    54
    is either the pathname of a local repository of the URI of a remote
181
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
    55
    repository.  There are two available URI protocols, http:// which is
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
    56
    fast and the old-http:// protocol which is much slower but does not 
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
    57
    require python on the web host.
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    58
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    59
COMMANDS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    60
--------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    61
add [files ...]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    62
    add the given files to the repository.  Note that this just schedules the
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    63
    files for addition at the next hg commit time.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    64
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    65
addremove::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    66
    add all new files and remove all missing files from the repository.  new
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    67
    files are ignored if they match any of the patterns in .hgignore
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    68
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    69
annotate [-r revision -u -n -c] [files ...]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    70
    list the files with each line showing the revision id responsible 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    71
    for that line.  -u will add the author to the revision id, -c will
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    72
    print the changeset hash, and -n will ...
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    73
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    74
branch <path>::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    75
    create a new branch of the repository indicated by path in the current
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    76
    directory.  Note that there should not be a repository already initialized
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    77
    in the current directory
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    78
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    79
checkout [revision]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    80
    check out the indicated version of the repository into the working
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    81
    directory.  Note that currently no merge occurs with changed files 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    82
    in the working dir.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    83
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    84
commit::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    85
    commit all changed files in the working dir to the repository.  This uses
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    86
    the EDITOR environment variable to bring up an editor to add a commit
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    87
    comment.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    88
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    89
diff [-r revision] [-r revision] [files ...]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    90
    generate a unified diff of the indicated files.  If there are no 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    91
    revisions specified, the working directory file is compared to 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    92
    the tip, one revision specified indicates a comparison between the 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    93
    working directory file and the specified revision, two revisions 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    94
    compares the two versions specified.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    95
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    96
dump <file> [revision]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    97
    print the indicated revision of the file
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    98
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
    99
dumpmanifest [revision]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   100
    print the indicated revision of the manifest (list of version controlled
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   101
    files)
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   102
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   103
history::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   104
    print the revision history of the repository
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   105
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   106
init::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   107
    initialize a repository in the current directory
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   108
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   109
log <file>::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   110
    print the revision history of the specified file
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   111
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   112
merge <repository path>::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   113
    pull any changes from the specified repository to the repository in the
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   114
    current directory.  Use the value of the HGMERGE environment variable
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   115
    as a program to resolve any merge conflicts between the two repositories.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   116
    An implicit commit is done at the end of this process if there were any
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   117
    merge conflicts.  Note that merge does not yet merge with changed files
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   118
    in the working dir.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   119
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   120
remove [files ...]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   121
    schedule the indicated files for removal from the repository at the next
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   122
    commit
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   123
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   124
serve [-a addr -n name -p port -t templatedir]::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   125
    this will start an http server, by default on port 8000, that will 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   126
    allow browsing the repository using the hgweb interface and will allow 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   127
    merging from the repository.  -a sets the interface address, -p the 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   128
    port to listen on, -n the name of the repository and -t sets the 
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   129
    location of the template directory.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   130
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   131
status::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   132
    list new, changed, and missing files in the working directory
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   133
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   134
tags::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   135
    list the current tags
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   136
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   137
ENVIRONMENT VARIABLES
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   138
---------------------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   139
HGMERGE::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   140
    points to an executable to use for resolving merge conflicts, the
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   141
    program will be executed with four arguments: local file, remote
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   142
    file, ancestor file, and original filename.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   143
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   144
HGUSER::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   145
    this is the string used for the author value of a commit
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   146
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   147
HG_OPTS::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   148
    this string is used for default arguments to hg
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   149
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   150
PYTHONPATH::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   151
    this is used by Python to find imported modules and needs to be set
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   152
    appropriately based on where mercurial is installed
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   153
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   154
EMAIL::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   155
    if HGUSER is not set, this will be used next as the author value for
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   156
    a commit
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   157
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   158
LOGNAME::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   159
    if neither HGUSER nor EMAIL is set, LOGNAME will be used (with
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   160
    '@hostname' appended) as the author value for a commit
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   161
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   162
EDITOR::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   163
    this is the name of the editor to use when committing
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   164
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   165
FILES
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   166
-----
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   167
 .hgignore::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   168
    this file contains regular expressions (one per line) that describe file
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   169
    names that should be ignored by hg
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   170
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   171
 .hgtags::
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   172
    this file contains changeset hash values and text tag names (one of each
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   173
    seperated by spaces) that correspond to tagged versions of the repository
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   174
    contents.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   175
181
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
   176
 $HOME/.hgpaths::
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
   177
    this file contains a mapping from a symbolic name to a repository path
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
   178
    (which could be a local path or a remote URI), the format is 
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
   179
    <symbolic name> <repository path> with each mapping on a seperate line
038e4d8602bd updated for .hgpaths and http/old-http protocol name change
jake@edge2.net
parents: 177
diff changeset
   180
177
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   181
BUGS
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   182
----
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   183
Probably lots, please post them to the mailing list (See Resources below)
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   184
when you find them.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   185
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   186
AUTHOR
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   187
------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   188
Written by Matt Mackall <mpm@selenic.com>
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   189
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   190
RESOURCES
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   191
---------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   192
http://selenic.com/mercurial[Main Web Site]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   193
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   194
http://selenic.com/hg[Source code repository]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   195
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   196
http://selenic.com/mailman/listinfo/mercurial[Mailing list]
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   197
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   198
COPYING
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   199
-------
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   200
Copyright (C) 2005 Matt Mackall.
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   201
Free use of this software is granted under the terms of the GNU General
91055f795d88 adding doc directory and files
jake@edge2.net
parents:
diff changeset
   202
Public License (GPL).