Show More
@@ -1,195 +1,194 b'' | |||||
1 | Use hgrc within $TESTTMP |
|
1 | Use hgrc within $TESTTMP | |
2 |
|
2 | |||
3 | $ HGRCPATH=`pwd`/hgrc |
|
3 | $ HGRCPATH=`pwd`/hgrc | |
4 | $ export HGRCPATH |
|
4 | $ export HGRCPATH | |
5 |
|
5 | |||
6 | Use an alternate var for scribbling on hgrc to keep check-code from |
|
6 | Use an alternate var for scribbling on hgrc to keep check-code from | |
7 | complaining about the important settings we may be overwriting: |
|
7 | complaining about the important settings we may be overwriting: | |
8 |
|
8 | |||
9 | $ HGRC=`pwd`/hgrc |
|
9 | $ HGRC=`pwd`/hgrc | |
10 | $ export HGRC |
|
10 | $ export HGRC | |
11 |
|
11 | |||
12 | Basic syntax error |
|
12 | Basic syntax error | |
13 |
|
13 | |||
14 | $ echo "invalid" > $HGRC |
|
14 | $ echo "invalid" > $HGRC | |
15 | $ hg version |
|
15 | $ hg version | |
16 | hg: parse error at $TESTTMP/hgrc:1: invalid |
|
16 | hg: parse error at $TESTTMP/hgrc:1: invalid | |
17 | [255] |
|
17 | [255] | |
18 | $ echo "" > $HGRC |
|
18 | $ echo "" > $HGRC | |
19 |
|
19 | |||
20 | Issue1199: Can't use '%' in hgrc (eg url encoded username) |
|
20 | Issue1199: Can't use '%' in hgrc (eg url encoded username) | |
21 |
|
21 | |||
22 | $ hg init "foo%bar" |
|
22 | $ hg init "foo%bar" | |
23 | $ hg clone "foo%bar" foobar |
|
23 | $ hg clone "foo%bar" foobar | |
24 | updating to branch default |
|
24 | updating to branch default | |
25 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 | $ cd foobar |
|
26 | $ cd foobar | |
27 | $ cat .hg/hgrc |
|
27 | $ cat .hg/hgrc | |
28 | [paths] |
|
28 | [paths] | |
29 | default = $TESTTMP/foo%bar (glob) |
|
29 | default = $TESTTMP/foo%bar (glob) | |
30 | $ hg paths |
|
30 | $ hg paths | |
31 | default = $TESTTMP/foo%bar (glob) |
|
31 | default = $TESTTMP/foo%bar (glob) | |
32 | $ hg showconfig |
|
32 | $ hg showconfig | |
33 | bundle.mainreporoot=$TESTTMP/foobar (glob) |
|
33 | bundle.mainreporoot=$TESTTMP/foobar (glob) | |
34 | paths.default=$TESTTMP/foo%bar (glob) |
|
34 | paths.default=$TESTTMP/foo%bar (glob) | |
35 | $ cd .. |
|
35 | $ cd .. | |
36 |
|
36 | |||
37 | issue1829: wrong indentation |
|
37 | issue1829: wrong indentation | |
38 |
|
38 | |||
39 | $ echo '[foo]' > $HGRC |
|
39 | $ echo '[foo]' > $HGRC | |
40 | $ echo ' x = y' >> $HGRC |
|
40 | $ echo ' x = y' >> $HGRC | |
41 | $ hg version |
|
41 | $ hg version | |
42 | hg: parse error at $TESTTMP/hgrc:2: x = y |
|
42 | hg: parse error at $TESTTMP/hgrc:2: x = y | |
43 | [255] |
|
43 | [255] | |
44 |
|
44 | |||
45 | $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ |
|
45 | $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ | |
46 | > > $HGRC |
|
46 | > > $HGRC | |
47 | $ hg showconfig foo |
|
47 | $ hg showconfig foo | |
48 | foo.bar=a\nb\nc\nde\nfg |
|
48 | foo.bar=a\nb\nc\nde\nfg | |
49 | foo.baz=bif cb |
|
49 | foo.baz=bif cb | |
50 |
|
50 | |||
51 | $ FAKEPATH=/path/to/nowhere |
|
51 | $ FAKEPATH=/path/to/nowhere | |
52 | $ export FAKEPATH |
|
52 | $ export FAKEPATH | |
53 | $ echo '%include $FAKEPATH/no-such-file' > $HGRC |
|
53 | $ echo '%include $FAKEPATH/no-such-file' > $HGRC | |
54 | $ hg version |
|
54 | $ hg version | |
55 | Mercurial Distributed SCM (version *) (glob) |
|
55 | Mercurial Distributed SCM (version *) (glob) | |
56 | (see http://mercurial.selenic.com for more information) |
|
56 | (see http://mercurial.selenic.com for more information) | |
57 |
|
57 | |||
58 | Copyright (C) 2005-2012 Matt Mackall and others |
|
58 | Copyright (C) 2005-2012 Matt Mackall and others | |
59 | This is free software; see the source for copying conditions. There is NO |
|
59 | This is free software; see the source for copying conditions. There is NO | |
60 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
60 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
61 | $ unset FAKEPATH |
|
61 | $ unset FAKEPATH | |
62 |
|
62 | |||
63 | make sure global options given on the cmdline take precedence |
|
63 | make sure global options given on the cmdline take precedence | |
64 |
|
64 | |||
65 | $ hg showconfig --config ui.verbose=True --quiet |
|
65 | $ hg showconfig --config ui.verbose=True --quiet | |
66 | ui.verbose=False |
|
66 | ui.verbose=False | |
67 | ui.debug=False |
|
67 | ui.debug=False | |
68 | ui.quiet=True |
|
68 | ui.quiet=True | |
69 |
|
69 | |||
70 | $ touch foobar/untracked |
|
70 | $ touch foobar/untracked | |
71 | $ cat >> foobar/.hg/hgrc <<EOF |
|
71 | $ cat >> foobar/.hg/hgrc <<EOF | |
72 | > [ui] |
|
72 | > [ui] | |
73 | > verbose=True |
|
73 | > verbose=True | |
74 | > EOF |
|
74 | > EOF | |
75 | $ hg -R foobar st -q |
|
75 | $ hg -R foobar st -q | |
76 |
|
76 | |||
77 | username expansion |
|
77 | username expansion | |
78 |
|
78 | |||
79 | $ olduser=$HGUSER |
|
79 | $ olduser=$HGUSER | |
80 | $ unset HGUSER |
|
80 | $ unset HGUSER | |
81 |
|
81 | |||
82 | $ FAKEUSER='John Doe' |
|
82 | $ FAKEUSER='John Doe' | |
83 | $ export FAKEUSER |
|
83 | $ export FAKEUSER | |
84 | $ echo '[ui]' > $HGRC |
|
84 | $ echo '[ui]' > $HGRC | |
85 | $ echo 'username = $FAKEUSER' >> $HGRC |
|
85 | $ echo 'username = $FAKEUSER' >> $HGRC | |
86 |
|
86 | |||
87 | $ hg init usertest |
|
87 | $ hg init usertest | |
88 | $ cd usertest |
|
88 | $ cd usertest | |
89 | $ touch bar |
|
89 | $ touch bar | |
90 | $ hg commit --addremove --quiet -m "added bar" |
|
90 | $ hg commit --addremove --quiet -m "added bar" | |
91 | $ hg log --template "{author}\n" |
|
91 | $ hg log --template "{author}\n" | |
92 | John Doe |
|
92 | John Doe | |
93 | $ cd .. |
|
93 | $ cd .. | |
94 |
|
94 | |||
95 | $ hg showconfig |
|
95 | $ hg showconfig | |
96 | ui.username=$FAKEUSER |
|
96 | ui.username=$FAKEUSER | |
97 |
|
97 | |||
98 | $ unset FAKEUSER |
|
98 | $ unset FAKEUSER | |
99 | $ HGUSER=$olduser |
|
99 | $ HGUSER=$olduser | |
100 | $ export HGUSER |
|
100 | $ export HGUSER | |
101 |
|
101 | |||
102 | showconfig with multiple arguments |
|
102 | showconfig with multiple arguments | |
103 |
|
103 | |||
104 | $ echo "[alias]" > $HGRC |
|
104 | $ echo "[alias]" > $HGRC | |
105 | $ echo "log = log -g" >> $HGRC |
|
105 | $ echo "log = log -g" >> $HGRC | |
106 | $ echo "[defaults]" >> $HGRC |
|
106 | $ echo "[defaults]" >> $HGRC | |
107 | $ echo "identify = -n" >> $HGRC |
|
107 | $ echo "identify = -n" >> $HGRC | |
108 | $ hg showconfig alias defaults |
|
108 | $ hg showconfig alias defaults | |
109 | alias.log=log -g |
|
109 | alias.log=log -g | |
110 | defaults.identify=-n |
|
110 | defaults.identify=-n | |
111 | $ hg showconfig alias defaults.identify |
|
111 | $ hg showconfig alias defaults.identify | |
112 | abort: only one config item permitted |
|
112 | abort: only one config item permitted | |
113 | [255] |
|
113 | [255] | |
114 | $ hg showconfig alias.log defaults.identify |
|
114 | $ hg showconfig alias.log defaults.identify | |
115 | abort: only one config item permitted |
|
115 | abort: only one config item permitted | |
116 | [255] |
|
116 | [255] | |
117 |
|
117 | |||
118 | HGPLAIN |
|
118 | HGPLAIN | |
119 |
|
119 | |||
120 | $ cd .. |
|
|||
121 | $ p=`pwd` |
|
120 | $ p=`pwd` | |
122 | $ echo "[ui]" > $HGRC |
|
121 | $ echo "[ui]" > $HGRC | |
123 | $ echo "debug=true" >> $HGRC |
|
122 | $ echo "debug=true" >> $HGRC | |
124 | $ echo "fallbackencoding=ASCII" >> $HGRC |
|
123 | $ echo "fallbackencoding=ASCII" >> $HGRC | |
125 | $ echo "quiet=true" >> $HGRC |
|
124 | $ echo "quiet=true" >> $HGRC | |
126 | $ echo "slash=true" >> $HGRC |
|
125 | $ echo "slash=true" >> $HGRC | |
127 | $ echo "traceback=true" >> $HGRC |
|
126 | $ echo "traceback=true" >> $HGRC | |
128 | $ echo "verbose=true" >> $HGRC |
|
127 | $ echo "verbose=true" >> $HGRC | |
129 | $ echo "style=~/.hgstyle" >> $HGRC |
|
128 | $ echo "style=~/.hgstyle" >> $HGRC | |
130 | $ echo "logtemplate={node}" >> $HGRC |
|
129 | $ echo "logtemplate={node}" >> $HGRC | |
131 | $ echo "[defaults]" >> $HGRC |
|
130 | $ echo "[defaults]" >> $HGRC | |
132 | $ echo "identify=-n" >> $HGRC |
|
131 | $ echo "identify=-n" >> $HGRC | |
133 | $ echo "[alias]" >> $HGRC |
|
132 | $ echo "[alias]" >> $HGRC | |
134 | $ echo "log=log -g" >> $HGRC |
|
133 | $ echo "log=log -g" >> $HGRC | |
135 |
|
134 | |||
136 | customized hgrc |
|
135 | customized hgrc | |
137 |
|
136 | |||
138 | $ hg showconfig |
|
137 | $ hg showconfig | |
139 | read config from: $TESTTMP/hgrc |
|
138 | read config from: $TESTTMP/hgrc | |
140 | $TESTTMP/hgrc:13: alias.log=log -g |
|
139 | $TESTTMP/hgrc:13: alias.log=log -g | |
141 | $TESTTMP/hgrc:11: defaults.identify=-n |
|
140 | $TESTTMP/hgrc:11: defaults.identify=-n | |
142 | $TESTTMP/hgrc:2: ui.debug=true |
|
141 | $TESTTMP/hgrc:2: ui.debug=true | |
143 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII |
|
142 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII | |
144 | $TESTTMP/hgrc:4: ui.quiet=true |
|
143 | $TESTTMP/hgrc:4: ui.quiet=true | |
145 | $TESTTMP/hgrc:5: ui.slash=true |
|
144 | $TESTTMP/hgrc:5: ui.slash=true | |
146 | $TESTTMP/hgrc:6: ui.traceback=true |
|
145 | $TESTTMP/hgrc:6: ui.traceback=true | |
147 | $TESTTMP/hgrc:7: ui.verbose=true |
|
146 | $TESTTMP/hgrc:7: ui.verbose=true | |
148 | $TESTTMP/hgrc:8: ui.style=~/.hgstyle |
|
147 | $TESTTMP/hgrc:8: ui.style=~/.hgstyle | |
149 | $TESTTMP/hgrc:9: ui.logtemplate={node} |
|
148 | $TESTTMP/hgrc:9: ui.logtemplate={node} | |
150 |
|
149 | |||
151 | plain hgrc |
|
150 | plain hgrc | |
152 |
|
151 | |||
153 | $ HGPLAIN=; export HGPLAIN |
|
152 | $ HGPLAIN=; export HGPLAIN | |
154 | $ hg showconfig --config ui.traceback=True --debug |
|
153 | $ hg showconfig --config ui.traceback=True --debug | |
155 | read config from: $TESTTMP/hgrc |
|
154 | read config from: $TESTTMP/hgrc | |
156 | none: ui.traceback=True |
|
155 | none: ui.traceback=True | |
157 | none: ui.verbose=False |
|
156 | none: ui.verbose=False | |
158 | none: ui.debug=True |
|
157 | none: ui.debug=True | |
159 | none: ui.quiet=False |
|
158 | none: ui.quiet=False | |
160 |
|
159 | |||
161 | plain mode with exceptions |
|
160 | plain mode with exceptions | |
162 |
|
161 | |||
163 | $ cat > plain.py <<EOF |
|
162 | $ cat > plain.py <<EOF | |
164 | > def uisetup(ui): |
|
163 | > def uisetup(ui): | |
165 | > ui.write('plain: %r\n' % ui.plain()) |
|
164 | > ui.write('plain: %r\n' % ui.plain()) | |
166 | > EOF |
|
165 | > EOF | |
167 | $ echo "[extensions]" >> $HGRC |
|
166 | $ echo "[extensions]" >> $HGRC | |
168 | $ echo "plain=./plain.py" >> $HGRC |
|
167 | $ echo "plain=./plain.py" >> $HGRC | |
169 | $ HGPLAINEXCEPT=; export HGPLAINEXCEPT |
|
168 | $ HGPLAINEXCEPT=; export HGPLAINEXCEPT | |
170 | $ hg showconfig --config ui.traceback=True --debug |
|
169 | $ hg showconfig --config ui.traceback=True --debug | |
171 | plain: True |
|
170 | plain: True | |
172 | read config from: $TESTTMP/hgrc |
|
171 | read config from: $TESTTMP/hgrc | |
173 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
172 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
174 | none: ui.traceback=True |
|
173 | none: ui.traceback=True | |
175 | none: ui.verbose=False |
|
174 | none: ui.verbose=False | |
176 | none: ui.debug=True |
|
175 | none: ui.debug=True | |
177 | none: ui.quiet=False |
|
176 | none: ui.quiet=False | |
178 | $ unset HGPLAIN |
|
177 | $ unset HGPLAIN | |
179 | $ hg showconfig --config ui.traceback=True --debug |
|
178 | $ hg showconfig --config ui.traceback=True --debug | |
180 | plain: True |
|
179 | plain: True | |
181 | read config from: $TESTTMP/hgrc |
|
180 | read config from: $TESTTMP/hgrc | |
182 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
181 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
183 | none: ui.traceback=True |
|
182 | none: ui.traceback=True | |
184 | none: ui.verbose=False |
|
183 | none: ui.verbose=False | |
185 | none: ui.debug=True |
|
184 | none: ui.debug=True | |
186 | none: ui.quiet=False |
|
185 | none: ui.quiet=False | |
187 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT |
|
186 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT | |
188 | $ hg showconfig --config ui.traceback=True --debug |
|
187 | $ hg showconfig --config ui.traceback=True --debug | |
189 | plain: True |
|
188 | plain: True | |
190 | read config from: $TESTTMP/hgrc |
|
189 | read config from: $TESTTMP/hgrc | |
191 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
190 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
192 | none: ui.traceback=True |
|
191 | none: ui.traceback=True | |
193 | none: ui.verbose=False |
|
192 | none: ui.verbose=False | |
194 | none: ui.debug=True |
|
193 | none: ui.debug=True | |
195 | none: ui.quiet=False |
|
194 | none: ui.quiet=False |
@@ -1,30 +1,27 b'' | |||||
1 | Test update logic when there are renames |
|
1 | Test update logic when there are renames | |
2 |
|
2 | |||
3 | Update with local changes across a file rename |
|
3 | Update with local changes across a file rename | |
4 |
|
4 | |||
5 | $ hg init |
|
5 | $ hg init | |
6 |
|
6 | |||
7 | $ echo a > a |
|
7 | $ echo a > a | |
8 | $ hg add a |
|
8 | $ hg add a | |
9 | $ hg ci -m a |
|
9 | $ hg ci -m a | |
10 |
|
10 | |||
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg ci -m rename |
|
12 | $ hg ci -m rename | |
13 |
|
13 | |||
14 | $ echo b > b |
|
14 | $ echo b > b | |
15 | $ hg ci -m change |
|
15 | $ hg ci -m change | |
16 |
|
16 | |||
17 | $ hg up -q 0 |
|
17 | $ hg up -q 0 | |
18 |
|
18 | |||
19 | $ echo c > a |
|
19 | $ echo c > a | |
20 |
|
20 | |||
21 | $ hg up |
|
21 | $ hg up | |
22 | merging a and b to b |
|
22 | merging a and b to b | |
23 | warning: conflicts during merge. |
|
23 | warning: conflicts during merge. | |
24 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
24 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
25 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
25 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
26 | use 'hg resolve' to retry unresolved file merges |
|
26 | use 'hg resolve' to retry unresolved file merges | |
27 | [1] |
|
27 | [1] | |
28 |
|
||||
29 | $ cd .. |
|
|||
30 |
|
General Comments 0
You need to be logged in to leave comments.
Login now