annotate tests/test-globalopts.t @ 12269:877236cdd437

add: move main part to cmdutil to make it easier to reuse
author Martin Geisler <mg@lazybytes.net>
date Mon, 13 Sep 2010 13:09:11 +0200
parents 9e40ea08c2ab
children 4134686b83e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
2
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
3 $ hg init a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
4 $ cd a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
5 $ echo a > a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
6 $ hg ci -A -d'1 0' -m a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
7 adding a
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
8
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
9 $ cd ..
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
10
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
11 $ hg init b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
12 $ cd b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
13 $ echo b > b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
14 $ hg ci -A -d'1 0' -m b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
15 adding b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
16
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
17 $ cd ..
7429
dbc40381620e tests: Skip tests if they will fail because of outer repo
Mads Kiilerich <mads@kiilerich.com>
parents: 6150
diff changeset
18
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
19 $ hg clone a c
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
20 updating to branch default
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
22 $ cd c
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
23 $ hg pull -f ../b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
24 pulling from ../b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
25 searching for changes
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
26 warning: repository is unrelated
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
27 adding changesets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
28 adding manifests
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
29 adding file changes
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
30 added 1 changesets with 1 changes to 1 files (+1 heads)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
31 (run 'hg heads' to see heads, 'hg merge' to merge)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
32 $ hg merge
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
34 (branch merge, don't forget to commit)
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
35
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
36 $ cd ..
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
37
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
38 Testing -R/--repository:
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
39
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
40 $ hg -R a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
41 changeset: 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
42 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
43 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
44 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
45 summary: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
46
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
47 $ hg --repository b tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
48 changeset: 0:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
49 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
50 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
51 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
52 summary: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
53
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
54
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
55 Implicit -R:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
56
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
57 $ hg ann a/a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
58 0: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
59 $ hg ann a/a a/a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
60 0: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
61 $ hg ann a/a b/b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
62 abort: There is no Mercurial repository here (.hg not found)!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
63 $ hg -R b ann a/a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
64 abort: a/a not under root
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
65 $ hg log
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
66 abort: There is no Mercurial repository here (.hg not found)!
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
67
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
68 Abbreviation of long option:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
69
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
70 $ hg --repo c tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
71 changeset: 1:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
72 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
73 parent: -1:000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
74 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
75 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
76 summary: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
77
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
78
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
79 earlygetopt with duplicate options (36d23de02da1):
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
80
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
81 $ hg --cwd a --cwd b --cwd c tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
82 changeset: 1:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
83 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
84 parent: -1:000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
85 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
86 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
87 summary: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
88
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
89 $ hg --repo c --repository b -R a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
90 changeset: 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
91 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
92 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
93 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
94 summary: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
95
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
96
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
97 earlygetopt short option without following space:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
98
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
99 $ hg -q -Rb tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
100 0:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
101
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
102 earlygetopt with illegal abbreviations:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
103
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
104 $ hg --confi "foo.bar=baz"
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
105 abort: option --config may not be abbreviated!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
106 $ hg --cw a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
107 abort: option --cwd may not be abbreviated!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
108 $ hg --rep a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
109 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
110 $ hg --repositor a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
111 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
112 $ hg -qR a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
113 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
114 $ hg -qRa tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
115 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
116
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
117 Testing --cwd:
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
118
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
119 $ hg --cwd a parents
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
120 changeset: 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
121 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
122 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
123 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
124 summary: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
125
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
126
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
127 Testing -y/--noninteractive - just be sure it is parsed:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
128
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
129 $ hg --cwd a tip -q --noninteractive
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
130 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
131 $ hg --cwd a tip -q -y
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
132 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
133
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
134 Testing -q/--quiet:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
135
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
136 $ hg -R a -q tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
137 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
138 $ hg -R b -q tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
139 0:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
140 $ hg -R c --quiet parents
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
141 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
142 1:b6c483daf290
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
143
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
144 Testing -v/--verbose:
6150
aafdea37f796 Infer a --repository argument from command arguments when reasonable.
Jesse Glick <jesse.glick@sun.com>
parents: 4734
diff changeset
145
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
146 $ hg --cwd c head -v
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
147 changeset: 1:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
148 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
149 parent: -1:000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
150 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
151 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
152 files: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
153 description:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
154 b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
155
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
156
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
157 changeset: 0:8580ff50825a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
158 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
159 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
160 files: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
161 description:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
162 a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
163
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
164
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
165 $ hg --cwd b tip --verbose
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
166 changeset: 0:b6c483daf290
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
167 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
168 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
169 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
170 files: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
171 description:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
172 b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
173
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
174
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
175
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
176 Testing --config:
4728
7bb5bcb089e3 Added test for earlygetopt fixes (36d23de02da1 and 79cc512a34ed)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4365
diff changeset
177
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
178 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
179 quuxfoo
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
180 $ hg --cwd c --config '' tip -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
181 abort: malformed --config option: '' (use --config section.name=value)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
182 $ hg --cwd c --config a.b tip -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
183 abort: malformed --config option: 'a.b' (use --config section.name=value)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
184 $ hg --cwd c --config a tip -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
185 abort: malformed --config option: 'a' (use --config section.name=value)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
186 $ hg --cwd c --config a.= tip -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
187 abort: malformed --config option: 'a.=' (use --config section.name=value)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
188 $ hg --cwd c --config .b= tip -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
189 abort: malformed --config option: '.b=' (use --config section.name=value)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
190
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
191 Testing --debug:
4728
7bb5bcb089e3 Added test for earlygetopt fixes (36d23de02da1 and 79cc512a34ed)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4365
diff changeset
192
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
193 $ hg --cwd c log --debug
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
194 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
195 tag: tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
196 parent: -1:0000000000000000000000000000000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
197 parent: -1:0000000000000000000000000000000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
198 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
199 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
200 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
201 files+: b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
202 extra: branch=default
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
203 description:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
204 b
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
205
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
206
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
207 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
208 parent: -1:0000000000000000000000000000000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
209 parent: -1:0000000000000000000000000000000000000000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
210 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
211 user: test
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
212 date: Thu Jan 01 00:00:01 1970 +0000
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
213 files+: a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
214 extra: branch=default
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
215 description:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
216 a
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
217
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
218
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
219
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
220 Testing --traceback:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
221
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
222 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
223 Traceback (most recent call last):
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
224
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
225 Testing --time:
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
226
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
227 $ hg --cwd a --time id
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
228 8580ff50825a tip
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
229 Time: real .*
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
230
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
231 Testing --version:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
232
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
233 $ hg --version -q
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
234 Mercurial Distributed SCM .*
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
235
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
236 Testing -h/--help:
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
237
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
238 $ hg -h
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
239 Mercurial Distributed SCM
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
240
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
241 list of commands:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
242
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
243 add add the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
244 addremove add all new files, delete all missing files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
245 annotate show changeset information by line for each file
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
246 archive create an unversioned archive of a repository revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
247 backout reverse effect of earlier changeset
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
248 bisect subdivision search of changesets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
249 branch set or show the current branch name
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
250 branches list repository named branches
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
251 bundle create a changegroup file
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
252 cat output the current or given revision of files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
253 clone make a copy of an existing repository
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
254 commit commit the specified files or all outstanding changes
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
255 copy mark files as copied for the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
256 diff diff repository (or selected files)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
257 export dump the header and diffs for one or more changesets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
258 forget forget the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
259 grep search for a pattern in specified files and revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
260 heads show current repository heads or show branch heads
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
261 help show help for a given topic or a help overview
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
262 identify identify the working copy or specified revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
263 import import an ordered set of patches
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
264 incoming show new changesets found in source
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
265 init create a new repository in the given directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
266 locate locate files matching specific patterns
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
267 log show revision history of entire repository or files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
268 manifest output the current or given revision of the project manifest
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
269 merge merge working directory with another revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
270 outgoing show changesets not found in the destination
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
271 parents show the parents of the working directory or revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
272 paths show aliases for remote repositories
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
273 pull pull changes from the specified source
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
274 push push changes to the specified destination
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
275 recover roll back an interrupted transaction
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
276 remove remove the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
277 rename rename files; equivalent of copy + remove
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
278 resolve redo merges or set/view the merge status of files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
279 revert restore individual files or directories to an earlier state
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
280 rollback roll back the last transaction (dangerous)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
281 root print the root (top) of the current working directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
282 serve start stand-alone webserver
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
283 showconfig show combined config settings from all hgrc files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
284 status show changed files in the working directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
285 summary summarize working directory state
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
286 tag add one or more tags for the current or given revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
287 tags list repository tags
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
288 tip show the tip revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
289 unbundle apply one or more changegroup files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
290 update update working directory (or switch revisions)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
291 verify verify the integrity of the repository
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
292 version output version and copyright information
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
293
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
294 additional help topics:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
295
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
296 config Configuration Files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
297 dates Date Formats
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
298 patterns File Name Patterns
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
299 environment Environment Variables
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
300 revisions Specifying Single Revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
301 multirevs Specifying Multiple Revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
302 revsets Specifying Revision Sets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
303 diffs Diff Formats
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
304 templating Template Usage
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
305 urls URL Paths
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
306 extensions Using additional features
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
307 hgweb Configuring hgweb
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
308 glossary Glossary
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
309
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
310 use "hg -v help" to show aliases and global options
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
311
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
312 $ hg --help
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
313 Mercurial Distributed SCM
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
314
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
315 list of commands:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
316
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
317 add add the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
318 addremove add all new files, delete all missing files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
319 annotate show changeset information by line for each file
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
320 archive create an unversioned archive of a repository revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
321 backout reverse effect of earlier changeset
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
322 bisect subdivision search of changesets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
323 branch set or show the current branch name
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
324 branches list repository named branches
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
325 bundle create a changegroup file
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
326 cat output the current or given revision of files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
327 clone make a copy of an existing repository
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
328 commit commit the specified files or all outstanding changes
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
329 copy mark files as copied for the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
330 diff diff repository (or selected files)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
331 export dump the header and diffs for one or more changesets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
332 forget forget the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
333 grep search for a pattern in specified files and revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
334 heads show current repository heads or show branch heads
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
335 help show help for a given topic or a help overview
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
336 identify identify the working copy or specified revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
337 import import an ordered set of patches
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
338 incoming show new changesets found in source
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
339 init create a new repository in the given directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
340 locate locate files matching specific patterns
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
341 log show revision history of entire repository or files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
342 manifest output the current or given revision of the project manifest
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
343 merge merge working directory with another revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
344 outgoing show changesets not found in the destination
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
345 parents show the parents of the working directory or revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
346 paths show aliases for remote repositories
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
347 pull pull changes from the specified source
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
348 push push changes to the specified destination
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
349 recover roll back an interrupted transaction
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
350 remove remove the specified files on the next commit
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
351 rename rename files; equivalent of copy + remove
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
352 resolve redo merges or set/view the merge status of files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
353 revert restore individual files or directories to an earlier state
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
354 rollback roll back the last transaction (dangerous)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
355 root print the root (top) of the current working directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
356 serve start stand-alone webserver
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
357 showconfig show combined config settings from all hgrc files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
358 status show changed files in the working directory
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
359 summary summarize working directory state
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
360 tag add one or more tags for the current or given revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
361 tags list repository tags
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
362 tip show the tip revision
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
363 unbundle apply one or more changegroup files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
364 update update working directory (or switch revisions)
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
365 verify verify the integrity of the repository
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
366 version output version and copyright information
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
367
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
368 additional help topics:
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
369
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
370 config Configuration Files
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
371 dates Date Formats
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
372 patterns File Name Patterns
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
373 environment Environment Variables
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
374 revisions Specifying Single Revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
375 multirevs Specifying Multiple Revisions
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
376 revsets Specifying Revision Sets
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
377 diffs Diff Formats
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
378 templating Template Usage
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
379 urls URL Paths
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
380 extensions Using additional features
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
381 hgweb Configuring hgweb
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
382 glossary Glossary
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
383
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
384 use "hg -v help" to show aliases and global options
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
385
12194
9e40ea08c2ab tests: unify test-globalopts
Adrian Buehlmann <adrian@cadifra.com>
parents: 7429
diff changeset
386 Not tested: --debugger
2293
3dc6f2501dbc add --config global option. allows to set hgrc option on command line.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
387