| 1 |
.TH HG ADDREMOVE "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg addremove \- add all new files, delete all missing files |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg addremove [OPTION]... [FILE]... |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
Add all new files and remove all missing files from the |
| 16 |
repository. |
| 17 |
.sp |
| 18 |
Unless names are given, new files are ignored if they match any of |
| 19 |
the patterns in \fB.hgignore\fP. As with add, these changes take |
| 20 |
effect at the next commit. |
| 21 |
.sp |
| 22 |
Use the \-s/\-\-similarity option to detect renamed files. This |
| 23 |
option takes a percentage between 0 (disabled) and 100 (files must |
| 24 |
be identical) as its parameter. With a parameter greater than 0, |
| 25 |
this compares every removed file with every added file and records |
| 26 |
those similar enough as renames. Detecting renamed files this way |
| 27 |
can be expensive. After using this option, \%\fBhg status \-C\fP\: can be |
| 28 |
used to check which files were identified as moved or renamed. If |
| 29 |
not specified, \-s/\-\-similarity defaults to 100 and only renames of |
| 30 |
identical files are detected. |
| 31 |
.sp |
| 32 |
Examples: |
| 33 |
.INDENT 0.0 |
| 34 |
.INDENT 3.5 |
| 35 |
.INDENT 0.0 |
| 36 |
.IP \(bu 2 |
| 37 |
. |
| 38 |
A number of files (bar.c and foo.c) are new, |
| 39 |
while foobar.c has been removed (without using \%\fBhg remove\fP\:) |
| 40 |
from the repository: |
| 41 |
.sp |
| 42 |
.nf |
| 43 |
.ft C |
| 44 |
$ ls |
| 45 |
bar.c foo.c |
| 46 |
$ hg status |
| 47 |
! foobar.c |
| 48 |
? bar.c |
| 49 |
? foo.c |
| 50 |
$ hg addremove |
| 51 |
adding bar.c |
| 52 |
adding foo.c |
| 53 |
removing foobar.c |
| 54 |
$ hg status |
| 55 |
A bar.c |
| 56 |
A foo.c |
| 57 |
R foobar.c |
| 58 |
.ft P |
| 59 |
.fi |
| 60 |
.IP \(bu 2 |
| 61 |
. |
| 62 |
A file foobar.c was moved to foo.c without using \%\fBhg rename\fP\:. |
| 63 |
Afterwards, it was edited slightly: |
| 64 |
.sp |
| 65 |
.nf |
| 66 |
.ft C |
| 67 |
$ ls |
| 68 |
foo.c |
| 69 |
$ hg status |
| 70 |
! foobar.c |
| 71 |
? foo.c |
| 72 |
$ hg addremove \-\-similarity 90 |
| 73 |
removing foobar.c |
| 74 |
adding foo.c |
| 75 |
recording removal of foobar.c as rename to foo.c (94% similar) |
| 76 |
$ hg status \-C |
| 77 |
A foo.c |
| 78 |
foobar.c |
| 79 |
R foobar.c |
| 80 |
.ft P |
| 81 |
.fi |
| 82 |
.UNINDENT |
| 83 |
.UNINDENT |
| 84 |
.UNINDENT |
| 85 |
.sp |
| 86 |
Returns 0 if all files are successfully added. |
| 87 |
.SH OPTIONS |
| 88 |
.INDENT 0.0 |
| 89 |
.TP |
| 90 |
.BI \-s, \-\-similarity \ <SIMILARITY> |
| 91 |
. |
| 92 |
guess renamed files by similarity (0<=s<=100) |
| 93 |
.TP |
| 94 |
.B \-S, \-\-subrepos |
| 95 |
. |
| 96 |
recurse into subrepositories |
| 97 |
.TP |
| 98 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 99 |
. |
| 100 |
include names matching the given patterns |
| 101 |
.TP |
| 102 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 103 |
. |
| 104 |
exclude names matching the given patterns |
| 105 |
.TP |
| 106 |
.B \-n, \-\-dry\-run |
| 107 |
. |
| 108 |
do not perform actions, just print output |
| 109 |
.UNINDENT |
| 110 |
.sp |
| 111 |
[+] marked option can be specified multiple times |
| 112 |
.\" Generated by docutils manpage writer. |
| 113 |
.\" |
| 114 |
. |