Show More
@@ -1,102 +1,97 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
|||
2 | $ echo "bookmarks=" >> $HGRCPATH |
|
|||
3 |
|
||||
4 | $ echo "[bookmarks]" >> $HGRCPATH |
|
|||
5 |
|
||||
6 |
|
|
1 | $ hg init | |
7 |
|
2 | |||
8 | no bookmarks |
|
3 | no bookmarks | |
9 |
|
4 | |||
10 | $ hg bookmarks |
|
5 | $ hg bookmarks | |
11 | no bookmarks set |
|
6 | no bookmarks set | |
12 |
|
7 | |||
13 | set bookmark X |
|
8 | set bookmark X | |
14 |
|
9 | |||
15 | $ hg bookmark X |
|
10 | $ hg bookmark X | |
16 |
|
11 | |||
17 | list bookmarks |
|
12 | list bookmarks | |
18 |
|
13 | |||
19 | $ hg bookmark |
|
14 | $ hg bookmark | |
20 | * X -1:000000000000 |
|
15 | * X -1:000000000000 | |
21 |
|
16 | |||
22 | list bookmarks with color |
|
17 | list bookmarks with color | |
23 |
|
18 | |||
24 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
19 | $ hg --config extensions.color= --config color.mode=ansi \ | |
25 | > bookmark --color=always |
|
20 | > bookmark --color=always | |
26 | \x1b[0;32m * X -1:000000000000\x1b[0m (esc) |
|
21 | \x1b[0;32m * X -1:000000000000\x1b[0m (esc) | |
27 |
|
22 | |||
28 | update to bookmark X |
|
23 | update to bookmark X | |
29 |
|
24 | |||
30 | $ hg update X |
|
25 | $ hg update X | |
31 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
32 |
|
27 | |||
33 | list bookmarks |
|
28 | list bookmarks | |
34 |
|
29 | |||
35 | $ hg bookmarks |
|
30 | $ hg bookmarks | |
36 | * X -1:000000000000 |
|
31 | * X -1:000000000000 | |
37 |
|
32 | |||
38 | rename |
|
33 | rename | |
39 |
|
34 | |||
40 | $ hg bookmark -m X Z |
|
35 | $ hg bookmark -m X Z | |
41 |
|
36 | |||
42 | list bookmarks |
|
37 | list bookmarks | |
43 |
|
38 | |||
44 | $ hg bookmarks |
|
39 | $ hg bookmarks | |
45 | * Z -1:000000000000 |
|
40 | * Z -1:000000000000 | |
46 |
|
41 | |||
47 | new bookmark Y |
|
42 | new bookmark Y | |
48 |
|
43 | |||
49 | $ hg bookmark Y |
|
44 | $ hg bookmark Y | |
50 |
|
45 | |||
51 | list bookmarks |
|
46 | list bookmarks | |
52 |
|
47 | |||
53 | $ hg bookmark |
|
48 | $ hg bookmark | |
54 | * Y -1:000000000000 |
|
49 | * Y -1:000000000000 | |
55 | Z -1:000000000000 |
|
50 | Z -1:000000000000 | |
56 |
|
51 | |||
57 | commit |
|
52 | commit | |
58 |
|
53 | |||
59 | $ echo 'b' > b |
|
54 | $ echo 'b' > b | |
60 | $ hg add b |
|
55 | $ hg add b | |
61 | $ hg commit -m'test' |
|
56 | $ hg commit -m'test' | |
62 |
|
57 | |||
63 | list bookmarks |
|
58 | list bookmarks | |
64 |
|
59 | |||
65 | $ hg bookmark |
|
60 | $ hg bookmark | |
66 | * Y 0:719295282060 |
|
61 | * Y 0:719295282060 | |
67 | Z -1:000000000000 |
|
62 | Z -1:000000000000 | |
68 |
|
63 | |||
69 | Verify that switching to Z updates the current bookmark: |
|
64 | Verify that switching to Z updates the current bookmark: | |
70 | $ hg update Z |
|
65 | $ hg update Z | |
71 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
66 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
72 | $ hg bookmark |
|
67 | $ hg bookmark | |
73 | Y 0:719295282060 |
|
68 | Y 0:719295282060 | |
74 | * Z -1:000000000000 |
|
69 | * Z -1:000000000000 | |
75 |
|
70 | |||
76 | Switch back to Y for the remaining tests in this file: |
|
71 | Switch back to Y for the remaining tests in this file: | |
77 | $ hg update Y |
|
72 | $ hg update Y | |
78 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 |
|
74 | |||
80 | delete bookmarks |
|
75 | delete bookmarks | |
81 |
|
76 | |||
82 | $ hg bookmark -d Y |
|
77 | $ hg bookmark -d Y | |
83 | $ hg bookmark -d Z |
|
78 | $ hg bookmark -d Z | |
84 |
|
79 | |||
85 | list bookmarks |
|
80 | list bookmarks | |
86 |
|
81 | |||
87 | $ hg bookmark |
|
82 | $ hg bookmark | |
88 | no bookmarks set |
|
83 | no bookmarks set | |
89 |
|
84 | |||
90 | update to tip |
|
85 | update to tip | |
91 |
|
86 | |||
92 | $ hg update tip |
|
87 | $ hg update tip | |
93 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
94 |
|
89 | |||
95 | set bookmark Y using -r . |
|
90 | set bookmark Y using -r . | |
96 |
|
91 | |||
97 | $ hg bookmark -r . Y |
|
92 | $ hg bookmark -r . Y | |
98 |
|
93 | |||
99 | list bookmarks |
|
94 | list bookmarks | |
100 |
|
95 | |||
101 | $ hg bookmark |
|
96 | $ hg bookmark | |
102 | * Y 0:719295282060 |
|
97 | * Y 0:719295282060 |
@@ -1,183 +1,180 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
|||
2 | $ echo "bookmarks=" >> $HGRCPATH |
|
|||
3 |
|
||||
4 | initialize |
|
1 | initialize | |
5 |
|
2 | |||
6 | $ hg init a |
|
3 | $ hg init a | |
7 | $ cd a |
|
4 | $ cd a | |
8 | $ echo 'test' > test |
|
5 | $ echo 'test' > test | |
9 | $ hg commit -Am'test' |
|
6 | $ hg commit -Am'test' | |
10 | adding test |
|
7 | adding test | |
11 |
|
8 | |||
12 | set bookmarks |
|
9 | set bookmarks | |
13 |
|
10 | |||
14 | $ hg bookmark X |
|
11 | $ hg bookmark X | |
15 | $ hg bookmark Y |
|
12 | $ hg bookmark Y | |
16 | $ hg bookmark Z |
|
13 | $ hg bookmark Z | |
17 |
|
14 | |||
18 | import bookmark by name |
|
15 | import bookmark by name | |
19 |
|
16 | |||
20 | $ hg init ../b |
|
17 | $ hg init ../b | |
21 | $ cd ../b |
|
18 | $ cd ../b | |
22 | $ hg book Y |
|
19 | $ hg book Y | |
23 | $ hg book |
|
20 | $ hg book | |
24 | * Y -1:000000000000 |
|
21 | * Y -1:000000000000 | |
25 | $ hg pull ../a |
|
22 | $ hg pull ../a | |
26 | pulling from ../a |
|
23 | pulling from ../a | |
27 | requesting all changes |
|
24 | requesting all changes | |
28 | adding changesets |
|
25 | adding changesets | |
29 | adding manifests |
|
26 | adding manifests | |
30 | adding file changes |
|
27 | adding file changes | |
31 | added 1 changesets with 1 changes to 1 files |
|
28 | added 1 changesets with 1 changes to 1 files | |
32 | (run 'hg update' to get a working copy) |
|
29 | (run 'hg update' to get a working copy) | |
33 | $ hg bookmarks |
|
30 | $ hg bookmarks | |
34 | Y 0:4e3505fd9583 |
|
31 | Y 0:4e3505fd9583 | |
35 | $ hg debugpushkey ../a namespaces |
|
32 | $ hg debugpushkey ../a namespaces | |
36 | bookmarks |
|
33 | bookmarks | |
37 | namespaces |
|
34 | namespaces | |
38 | $ hg debugpushkey ../a bookmarks |
|
35 | $ hg debugpushkey ../a bookmarks | |
39 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
36 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
40 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
37 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
41 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
38 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
42 | $ hg pull -B X ../a |
|
39 | $ hg pull -B X ../a | |
43 | pulling from ../a |
|
40 | pulling from ../a | |
44 | searching for changes |
|
41 | searching for changes | |
45 | no changes found |
|
42 | no changes found | |
46 | importing bookmark X |
|
43 | importing bookmark X | |
47 | $ hg bookmark |
|
44 | $ hg bookmark | |
48 | X 0:4e3505fd9583 |
|
45 | X 0:4e3505fd9583 | |
49 | Y 0:4e3505fd9583 |
|
46 | Y 0:4e3505fd9583 | |
50 |
|
47 | |||
51 | export bookmark by name |
|
48 | export bookmark by name | |
52 |
|
49 | |||
53 | $ hg bookmark W |
|
50 | $ hg bookmark W | |
54 | $ hg bookmark foo |
|
51 | $ hg bookmark foo | |
55 | $ hg bookmark foobar |
|
52 | $ hg bookmark foobar | |
56 | $ hg push -B W ../a |
|
53 | $ hg push -B W ../a | |
57 | pushing to ../a |
|
54 | pushing to ../a | |
58 | searching for changes |
|
55 | searching for changes | |
59 | no changes found |
|
56 | no changes found | |
60 | exporting bookmark W |
|
57 | exporting bookmark W | |
61 | $ hg -R ../a bookmarks |
|
58 | $ hg -R ../a bookmarks | |
62 | W -1:000000000000 |
|
59 | W -1:000000000000 | |
63 | X 0:4e3505fd9583 |
|
60 | X 0:4e3505fd9583 | |
64 | Y 0:4e3505fd9583 |
|
61 | Y 0:4e3505fd9583 | |
65 | * Z 0:4e3505fd9583 |
|
62 | * Z 0:4e3505fd9583 | |
66 |
|
63 | |||
67 | delete a remote bookmark |
|
64 | delete a remote bookmark | |
68 |
|
65 | |||
69 | $ hg book -d W |
|
66 | $ hg book -d W | |
70 | $ hg push -B W ../a |
|
67 | $ hg push -B W ../a | |
71 | pushing to ../a |
|
68 | pushing to ../a | |
72 | searching for changes |
|
69 | searching for changes | |
73 | no changes found |
|
70 | no changes found | |
74 | deleting remote bookmark W |
|
71 | deleting remote bookmark W | |
75 |
|
72 | |||
76 | push/pull name that doesn't exist |
|
73 | push/pull name that doesn't exist | |
77 |
|
74 | |||
78 | $ hg push -B badname ../a |
|
75 | $ hg push -B badname ../a | |
79 | pushing to ../a |
|
76 | pushing to ../a | |
80 | searching for changes |
|
77 | searching for changes | |
81 | no changes found |
|
78 | no changes found | |
82 | bookmark badname does not exist on the local or remote repository! |
|
79 | bookmark badname does not exist on the local or remote repository! | |
83 | [2] |
|
80 | [2] | |
84 | $ hg pull -B anotherbadname ../a |
|
81 | $ hg pull -B anotherbadname ../a | |
85 | pulling from ../a |
|
82 | pulling from ../a | |
86 | abort: remote bookmark anotherbadname not found! |
|
83 | abort: remote bookmark anotherbadname not found! | |
87 | [255] |
|
84 | [255] | |
88 |
|
85 | |||
89 | divergent bookmarks |
|
86 | divergent bookmarks | |
90 |
|
87 | |||
91 | $ cd ../a |
|
88 | $ cd ../a | |
92 | $ echo c1 > f1 |
|
89 | $ echo c1 > f1 | |
93 | $ hg ci -Am1 |
|
90 | $ hg ci -Am1 | |
94 | adding f1 |
|
91 | adding f1 | |
95 | $ hg book -f X |
|
92 | $ hg book -f X | |
96 | $ hg book |
|
93 | $ hg book | |
97 | * X 1:0d2164f0ce0d |
|
94 | * X 1:0d2164f0ce0d | |
98 | Y 0:4e3505fd9583 |
|
95 | Y 0:4e3505fd9583 | |
99 | Z 1:0d2164f0ce0d |
|
96 | Z 1:0d2164f0ce0d | |
100 |
|
97 | |||
101 | $ cd ../b |
|
98 | $ cd ../b | |
102 | $ hg up |
|
99 | $ hg up | |
103 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
104 | $ echo c2 > f2 |
|
101 | $ echo c2 > f2 | |
105 | $ hg ci -Am2 |
|
102 | $ hg ci -Am2 | |
106 | adding f2 |
|
103 | adding f2 | |
107 | $ hg book -f X |
|
104 | $ hg book -f X | |
108 | $ hg book |
|
105 | $ hg book | |
109 | * X 1:9b140be10808 |
|
106 | * X 1:9b140be10808 | |
110 | Y 0:4e3505fd9583 |
|
107 | Y 0:4e3505fd9583 | |
111 | foo -1:000000000000 |
|
108 | foo -1:000000000000 | |
112 | foobar -1:000000000000 |
|
109 | foobar -1:000000000000 | |
113 |
|
110 | |||
114 | $ hg pull ../a |
|
111 | $ hg pull ../a | |
115 | pulling from ../a |
|
112 | pulling from ../a | |
116 | searching for changes |
|
113 | searching for changes | |
117 | adding changesets |
|
114 | adding changesets | |
118 | adding manifests |
|
115 | adding manifests | |
119 | adding file changes |
|
116 | adding file changes | |
120 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
117 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
121 | not updating divergent bookmark X |
|
118 | not updating divergent bookmark X | |
122 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
119 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
123 | $ hg book |
|
120 | $ hg book | |
124 | * X 1:9b140be10808 |
|
121 | * X 1:9b140be10808 | |
125 | Y 0:4e3505fd9583 |
|
122 | Y 0:4e3505fd9583 | |
126 | foo -1:000000000000 |
|
123 | foo -1:000000000000 | |
127 | foobar -1:000000000000 |
|
124 | foobar -1:000000000000 | |
128 | $ hg push -f ../a |
|
125 | $ hg push -f ../a | |
129 | pushing to ../a |
|
126 | pushing to ../a | |
130 | searching for changes |
|
127 | searching for changes | |
131 | adding changesets |
|
128 | adding changesets | |
132 | adding manifests |
|
129 | adding manifests | |
133 | adding file changes |
|
130 | adding file changes | |
134 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
131 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
135 | $ hg -R ../a book |
|
132 | $ hg -R ../a book | |
136 | * X 1:0d2164f0ce0d |
|
133 | * X 1:0d2164f0ce0d | |
137 | Y 0:4e3505fd9583 |
|
134 | Y 0:4e3505fd9583 | |
138 | Z 1:0d2164f0ce0d |
|
135 | Z 1:0d2164f0ce0d | |
139 |
|
136 | |||
140 | hgweb |
|
137 | hgweb | |
141 |
|
138 | |||
142 | $ cat <<EOF > .hg/hgrc |
|
139 | $ cat <<EOF > .hg/hgrc | |
143 | > [web] |
|
140 | > [web] | |
144 | > push_ssl = false |
|
141 | > push_ssl = false | |
145 | > allow_push = * |
|
142 | > allow_push = * | |
146 | > EOF |
|
143 | > EOF | |
147 |
|
144 | |||
148 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log |
|
145 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log | |
149 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
146 | $ cat ../hg.pid >> $DAEMON_PIDS | |
150 | $ cd ../a |
|
147 | $ cd ../a | |
151 |
|
148 | |||
152 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces |
|
149 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces | |
153 | bookmarks |
|
150 | bookmarks | |
154 | namespaces |
|
151 | namespaces | |
155 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks |
|
152 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks | |
156 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
153 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
157 | X 9b140be1080824d768c5a4691a564088eede71f9 |
|
154 | X 9b140be1080824d768c5a4691a564088eede71f9 | |
158 | foo 0000000000000000000000000000000000000000 |
|
155 | foo 0000000000000000000000000000000000000000 | |
159 | foobar 0000000000000000000000000000000000000000 |
|
156 | foobar 0000000000000000000000000000000000000000 | |
160 | $ hg out -B http://localhost:$HGPORT/ |
|
157 | $ hg out -B http://localhost:$HGPORT/ | |
161 | comparing with http://localhost:$HGPORT/ |
|
158 | comparing with http://localhost:$HGPORT/ | |
162 | searching for changed bookmarks |
|
159 | searching for changed bookmarks | |
163 | Z 0d2164f0ce0d |
|
160 | Z 0d2164f0ce0d | |
164 | $ hg push -B Z http://localhost:$HGPORT/ |
|
161 | $ hg push -B Z http://localhost:$HGPORT/ | |
165 | pushing to http://localhost:$HGPORT/ |
|
162 | pushing to http://localhost:$HGPORT/ | |
166 | searching for changes |
|
163 | searching for changes | |
167 | no changes found |
|
164 | no changes found | |
168 | exporting bookmark Z |
|
165 | exporting bookmark Z | |
169 | $ hg book -d Z |
|
166 | $ hg book -d Z | |
170 | $ hg in -B http://localhost:$HGPORT/ |
|
167 | $ hg in -B http://localhost:$HGPORT/ | |
171 | comparing with http://localhost:$HGPORT/ |
|
168 | comparing with http://localhost:$HGPORT/ | |
172 | searching for changed bookmarks |
|
169 | searching for changed bookmarks | |
173 | Z 0d2164f0ce0d |
|
170 | Z 0d2164f0ce0d | |
174 | foo 000000000000 |
|
171 | foo 000000000000 | |
175 | foobar 000000000000 |
|
172 | foobar 000000000000 | |
176 | $ hg pull -B Z http://localhost:$HGPORT/ |
|
173 | $ hg pull -B Z http://localhost:$HGPORT/ | |
177 | pulling from http://localhost:$HGPORT/ |
|
174 | pulling from http://localhost:$HGPORT/ | |
178 | searching for changes |
|
175 | searching for changes | |
179 | no changes found |
|
176 | no changes found | |
180 | not updating divergent bookmark X |
|
177 | not updating divergent bookmark X | |
181 | importing bookmark Z |
|
178 | importing bookmark Z | |
182 |
|
179 | |||
183 | $ kill `cat ../hg.pid` |
|
180 | $ kill `cat ../hg.pid` |
@@ -1,68 +1,67 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "rebase=" >> $HGRCPATH |
|
2 | $ echo "rebase=" >> $HGRCPATH | |
3 | $ echo "bookmarks=" >> $HGRCPATH |
|
|||
4 |
|
3 | |||
5 | initialize repository |
|
4 | initialize repository | |
6 |
|
5 | |||
7 | $ hg init |
|
6 | $ hg init | |
8 |
|
7 | |||
9 | $ echo 'a' > a |
|
8 | $ echo 'a' > a | |
10 | $ hg ci -A -m "0" |
|
9 | $ hg ci -A -m "0" | |
11 | adding a |
|
10 | adding a | |
12 |
|
11 | |||
13 | $ echo 'b' > b |
|
12 | $ echo 'b' > b | |
14 | $ hg ci -A -m "1" |
|
13 | $ hg ci -A -m "1" | |
15 | adding b |
|
14 | adding b | |
16 |
|
15 | |||
17 | $ hg up 0 |
|
16 | $ hg up 0 | |
18 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
17 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
19 | $ echo 'c' > c |
|
18 | $ echo 'c' > c | |
20 | $ hg ci -A -m "2" |
|
19 | $ hg ci -A -m "2" | |
21 | adding c |
|
20 | adding c | |
22 | created new head |
|
21 | created new head | |
23 |
|
22 | |||
24 | $ echo 'd' > d |
|
23 | $ echo 'd' > d | |
25 | $ hg ci -A -m "3" |
|
24 | $ hg ci -A -m "3" | |
26 | adding d |
|
25 | adding d | |
27 |
|
26 | |||
28 | $ hg bookmark -r 1 one |
|
27 | $ hg bookmark -r 1 one | |
29 | $ hg bookmark -r 3 two |
|
28 | $ hg bookmark -r 3 two | |
30 |
|
29 | |||
31 | bookmark list |
|
30 | bookmark list | |
32 |
|
31 | |||
33 | $ hg bookmark |
|
32 | $ hg bookmark | |
34 | one 1:925d80f479bb |
|
33 | one 1:925d80f479bb | |
35 | * two 3:2ae46b1d99a7 |
|
34 | * two 3:2ae46b1d99a7 | |
36 |
|
35 | |||
37 | rebase |
|
36 | rebase | |
38 |
|
37 | |||
39 | $ hg rebase -s two -d one |
|
38 | $ hg rebase -s two -d one | |
40 | saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob) |
|
39 | saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob) | |
41 |
|
40 | |||
42 | $ hg log |
|
41 | $ hg log | |
43 | changeset: 3:9163974d1cb5 |
|
42 | changeset: 3:9163974d1cb5 | |
44 | bookmark: two |
|
43 | bookmark: two | |
45 | tag: tip |
|
44 | tag: tip | |
46 | parent: 1:925d80f479bb |
|
45 | parent: 1:925d80f479bb | |
47 | parent: 2:db815d6d32e6 |
|
46 | parent: 2:db815d6d32e6 | |
48 | user: test |
|
47 | user: test | |
49 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | date: Thu Jan 01 00:00:00 1970 +0000 | |
50 | summary: 3 |
|
49 | summary: 3 | |
51 |
|
50 | |||
52 | changeset: 2:db815d6d32e6 |
|
51 | changeset: 2:db815d6d32e6 | |
53 | parent: 0:f7b1eb17ad24 |
|
52 | parent: 0:f7b1eb17ad24 | |
54 | user: test |
|
53 | user: test | |
55 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | date: Thu Jan 01 00:00:00 1970 +0000 | |
56 | summary: 2 |
|
55 | summary: 2 | |
57 |
|
56 | |||
58 | changeset: 1:925d80f479bb |
|
57 | changeset: 1:925d80f479bb | |
59 | bookmark: one |
|
58 | bookmark: one | |
60 | user: test |
|
59 | user: test | |
61 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
60 | date: Thu Jan 01 00:00:00 1970 +0000 | |
62 | summary: 1 |
|
61 | summary: 1 | |
63 |
|
62 | |||
64 | changeset: 0:f7b1eb17ad24 |
|
63 | changeset: 0:f7b1eb17ad24 | |
65 | user: test |
|
64 | user: test | |
66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
65 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: 0 |
|
66 | summary: 0 | |
68 |
|
67 |
@@ -1,103 +1,102 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "bookmarks=" >> $HGRCPATH |
|
|||
3 | $ echo "mq=" >> $HGRCPATH |
|
2 | $ echo "mq=" >> $HGRCPATH | |
4 |
|
3 | |||
5 | $ hg init |
|
4 | $ hg init | |
6 |
|
5 | |||
7 | $ echo qqq>qqq.txt |
|
6 | $ echo qqq>qqq.txt | |
8 |
|
7 | |||
9 | rollback dry run without rollback information |
|
8 | rollback dry run without rollback information | |
10 |
|
9 | |||
11 | $ hg rollback |
|
10 | $ hg rollback | |
12 | no rollback information available |
|
11 | no rollback information available | |
13 | [1] |
|
12 | [1] | |
14 |
|
13 | |||
15 | add file |
|
14 | add file | |
16 |
|
15 | |||
17 | $ hg add |
|
16 | $ hg add | |
18 | adding qqq.txt |
|
17 | adding qqq.txt | |
19 |
|
18 | |||
20 | commit first revision |
|
19 | commit first revision | |
21 |
|
20 | |||
22 | $ hg ci -m 1 |
|
21 | $ hg ci -m 1 | |
23 |
|
22 | |||
24 | set bookmark |
|
23 | set bookmark | |
25 |
|
24 | |||
26 | $ hg book test |
|
25 | $ hg book test | |
27 |
|
26 | |||
28 | $ echo www>>qqq.txt |
|
27 | $ echo www>>qqq.txt | |
29 |
|
28 | |||
30 | commit second revision |
|
29 | commit second revision | |
31 |
|
30 | |||
32 | $ hg ci -m 2 |
|
31 | $ hg ci -m 2 | |
33 |
|
32 | |||
34 | set bookmark |
|
33 | set bookmark | |
35 |
|
34 | |||
36 | $ hg book test2 |
|
35 | $ hg book test2 | |
37 |
|
36 | |||
38 | update to -2 |
|
37 | update to -2 | |
39 |
|
38 | |||
40 | $ hg update -r -2 |
|
39 | $ hg update -r -2 | |
41 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 |
|
41 | |||
43 | $ echo eee>>qqq.txt |
|
42 | $ echo eee>>qqq.txt | |
44 |
|
43 | |||
45 | commit new head |
|
44 | commit new head | |
46 |
|
45 | |||
47 | $ hg ci -m 3 |
|
46 | $ hg ci -m 3 | |
48 | created new head |
|
47 | created new head | |
49 |
|
48 | |||
50 | bookmarks updated? |
|
49 | bookmarks updated? | |
51 |
|
50 | |||
52 | $ hg book |
|
51 | $ hg book | |
53 | test 1:25e1ee7a0081 |
|
52 | test 1:25e1ee7a0081 | |
54 | test2 1:25e1ee7a0081 |
|
53 | test2 1:25e1ee7a0081 | |
55 |
|
54 | |||
56 | strip to revision 1 |
|
55 | strip to revision 1 | |
57 |
|
56 | |||
58 | $ hg strip 1 |
|
57 | $ hg strip 1 | |
59 | saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob) |
|
58 | saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob) | |
60 |
|
59 | |||
61 | list bookmarks |
|
60 | list bookmarks | |
62 |
|
61 | |||
63 | $ hg book |
|
62 | $ hg book | |
64 | test 1:8cf31af87a2b |
|
63 | test 1:8cf31af87a2b | |
65 | * test2 1:8cf31af87a2b |
|
64 | * test2 1:8cf31af87a2b | |
66 |
|
65 | |||
67 | immediate rollback and reentrancy issue |
|
66 | immediate rollback and reentrancy issue | |
68 |
|
67 | |||
69 | $ echo "mq=!" >> $HGRCPATH |
|
68 | $ echo "mq=!" >> $HGRCPATH | |
70 | $ hg init repo |
|
69 | $ hg init repo | |
71 | $ cd repo |
|
70 | $ cd repo | |
72 | $ echo a > a |
|
71 | $ echo a > a | |
73 | $ hg ci -Am adda |
|
72 | $ hg ci -Am adda | |
74 | adding a |
|
73 | adding a | |
75 | $ echo b > b |
|
74 | $ echo b > b | |
76 | $ hg ci -Am addb |
|
75 | $ hg ci -Am addb | |
77 | adding b |
|
76 | adding b | |
78 | $ hg bookmarks markb |
|
77 | $ hg bookmarks markb | |
79 | $ hg rollback |
|
78 | $ hg rollback | |
80 | repository tip rolled back to revision 0 (undo commit) |
|
79 | repository tip rolled back to revision 0 (undo commit) | |
81 | working directory now based on revision 0 |
|
80 | working directory now based on revision 0 | |
82 |
|
81 | |||
83 | are you there? |
|
82 | are you there? | |
84 |
|
83 | |||
85 | $ hg bookmarks |
|
84 | $ hg bookmarks | |
86 | no bookmarks set |
|
85 | no bookmarks set | |
87 |
|
86 | |||
88 | can you be added again? |
|
87 | can you be added again? | |
89 |
|
88 | |||
90 | $ hg bookmarks markb |
|
89 | $ hg bookmarks markb | |
91 | $ hg bookmarks |
|
90 | $ hg bookmarks | |
92 | * markb 0:07f494440405 |
|
91 | * markb 0:07f494440405 | |
93 |
|
92 | |||
94 | rollback dry run with rollback information |
|
93 | rollback dry run with rollback information | |
95 |
|
94 | |||
96 | $ hg rollback -n |
|
95 | $ hg rollback -n | |
97 | no rollback information available |
|
96 | no rollback information available | |
98 | [1] |
|
97 | [1] | |
99 | $ hg bookmarks |
|
98 | $ hg bookmarks | |
100 | * markb 0:07f494440405 |
|
99 | * markb 0:07f494440405 | |
101 |
|
100 | |||
102 | $ cd .. |
|
101 | $ cd .. | |
103 |
|
102 |
@@ -1,236 +1,233 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
|||
2 | $ echo "bookmarks=" >> $HGRCPATH |
|
|||
3 |
|
||||
4 |
|
|
1 | $ hg init | |
5 |
|
2 | |||
6 | no bookmarks |
|
3 | no bookmarks | |
7 |
|
4 | |||
8 | $ hg bookmarks |
|
5 | $ hg bookmarks | |
9 | no bookmarks set |
|
6 | no bookmarks set | |
10 |
|
7 | |||
11 | bookmark rev -1 |
|
8 | bookmark rev -1 | |
12 |
|
9 | |||
13 | $ hg bookmark X |
|
10 | $ hg bookmark X | |
14 |
|
11 | |||
15 | list bookmarks |
|
12 | list bookmarks | |
16 |
|
13 | |||
17 | $ hg bookmarks |
|
14 | $ hg bookmarks | |
18 | * X -1:000000000000 |
|
15 | * X -1:000000000000 | |
19 |
|
16 | |||
20 | list bookmarks with color |
|
17 | list bookmarks with color | |
21 |
|
18 | |||
22 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
19 | $ hg --config extensions.color= --config color.mode=ansi \ | |
23 | > bookmarks --color=always |
|
20 | > bookmarks --color=always | |
24 | \x1b[0;32m * X -1:000000000000\x1b[0m (esc) |
|
21 | \x1b[0;32m * X -1:000000000000\x1b[0m (esc) | |
25 |
|
22 | |||
26 | $ echo a > a |
|
23 | $ echo a > a | |
27 | $ hg add a |
|
24 | $ hg add a | |
28 | $ hg commit -m 0 |
|
25 | $ hg commit -m 0 | |
29 |
|
26 | |||
30 | bookmark X moved to rev 0 |
|
27 | bookmark X moved to rev 0 | |
31 |
|
28 | |||
32 | $ hg bookmarks |
|
29 | $ hg bookmarks | |
33 | * X 0:f7b1eb17ad24 |
|
30 | * X 0:f7b1eb17ad24 | |
34 |
|
31 | |||
35 | look up bookmark |
|
32 | look up bookmark | |
36 |
|
33 | |||
37 | $ hg log -r X |
|
34 | $ hg log -r X | |
38 | changeset: 0:f7b1eb17ad24 |
|
35 | changeset: 0:f7b1eb17ad24 | |
39 | bookmark: X |
|
36 | bookmark: X | |
40 | tag: tip |
|
37 | tag: tip | |
41 | user: test |
|
38 | user: test | |
42 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
39 | date: Thu Jan 01 00:00:00 1970 +0000 | |
43 | summary: 0 |
|
40 | summary: 0 | |
44 |
|
41 | |||
45 |
|
42 | |||
46 | second bookmark for rev 0 |
|
43 | second bookmark for rev 0 | |
47 |
|
44 | |||
48 | $ hg bookmark X2 |
|
45 | $ hg bookmark X2 | |
49 |
|
46 | |||
50 | bookmark rev -1 again |
|
47 | bookmark rev -1 again | |
51 |
|
48 | |||
52 | $ hg bookmark -r null Y |
|
49 | $ hg bookmark -r null Y | |
53 |
|
50 | |||
54 | list bookmarks |
|
51 | list bookmarks | |
55 |
|
52 | |||
56 | $ hg bookmarks |
|
53 | $ hg bookmarks | |
57 | X 0:f7b1eb17ad24 |
|
54 | X 0:f7b1eb17ad24 | |
58 | * X2 0:f7b1eb17ad24 |
|
55 | * X2 0:f7b1eb17ad24 | |
59 | Y -1:000000000000 |
|
56 | Y -1:000000000000 | |
60 |
|
57 | |||
61 | $ echo b > b |
|
58 | $ echo b > b | |
62 | $ hg add b |
|
59 | $ hg add b | |
63 | $ hg commit -m 1 |
|
60 | $ hg commit -m 1 | |
64 |
|
61 | |||
65 | bookmarks revset |
|
62 | bookmarks revset | |
66 |
|
63 | |||
67 | $ hg log -r 'bookmark()' |
|
64 | $ hg log -r 'bookmark()' | |
68 | changeset: 0:f7b1eb17ad24 |
|
65 | changeset: 0:f7b1eb17ad24 | |
69 | bookmark: X |
|
66 | bookmark: X | |
70 | user: test |
|
67 | user: test | |
71 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
72 | summary: 0 |
|
69 | summary: 0 | |
73 |
|
70 | |||
74 | changeset: 1:925d80f479bb |
|
71 | changeset: 1:925d80f479bb | |
75 | bookmark: X2 |
|
72 | bookmark: X2 | |
76 | tag: tip |
|
73 | tag: tip | |
77 | user: test |
|
74 | user: test | |
78 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
75 | date: Thu Jan 01 00:00:00 1970 +0000 | |
79 | summary: 1 |
|
76 | summary: 1 | |
80 |
|
77 | |||
81 | $ hg log -r 'bookmark(Y)' |
|
78 | $ hg log -r 'bookmark(Y)' | |
82 | $ hg log -r 'bookmark(X2)' |
|
79 | $ hg log -r 'bookmark(X2)' | |
83 | changeset: 1:925d80f479bb |
|
80 | changeset: 1:925d80f479bb | |
84 | bookmark: X2 |
|
81 | bookmark: X2 | |
85 | tag: tip |
|
82 | tag: tip | |
86 | user: test |
|
83 | user: test | |
87 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
84 | date: Thu Jan 01 00:00:00 1970 +0000 | |
88 | summary: 1 |
|
85 | summary: 1 | |
89 |
|
86 | |||
90 | $ hg help revsets | grep 'bookmark(' |
|
87 | $ hg help revsets | grep 'bookmark(' | |
91 | "bookmark([name])" |
|
88 | "bookmark([name])" | |
92 |
|
89 | |||
93 | bookmarks X and X2 moved to rev 1, Y at rev -1 |
|
90 | bookmarks X and X2 moved to rev 1, Y at rev -1 | |
94 |
|
91 | |||
95 | $ hg bookmarks |
|
92 | $ hg bookmarks | |
96 | X 0:f7b1eb17ad24 |
|
93 | X 0:f7b1eb17ad24 | |
97 | * X2 1:925d80f479bb |
|
94 | * X2 1:925d80f479bb | |
98 | Y -1:000000000000 |
|
95 | Y -1:000000000000 | |
99 |
|
96 | |||
100 | bookmark rev 0 again |
|
97 | bookmark rev 0 again | |
101 |
|
98 | |||
102 | $ hg bookmark -r 0 Z |
|
99 | $ hg bookmark -r 0 Z | |
103 |
|
100 | |||
104 | $ hg update X |
|
101 | $ hg update X | |
105 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
102 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
106 | $ echo c > c |
|
103 | $ echo c > c | |
107 | $ hg add c |
|
104 | $ hg add c | |
108 | $ hg commit -m 2 |
|
105 | $ hg commit -m 2 | |
109 | created new head |
|
106 | created new head | |
110 |
|
107 | |||
111 | bookmarks X moved to rev 2, Y at rev -1, Z at rev 0 |
|
108 | bookmarks X moved to rev 2, Y at rev -1, Z at rev 0 | |
112 |
|
109 | |||
113 | $ hg bookmarks |
|
110 | $ hg bookmarks | |
114 | * X 2:db815d6d32e6 |
|
111 | * X 2:db815d6d32e6 | |
115 | X2 1:925d80f479bb |
|
112 | X2 1:925d80f479bb | |
116 | Y -1:000000000000 |
|
113 | Y -1:000000000000 | |
117 | Z 0:f7b1eb17ad24 |
|
114 | Z 0:f7b1eb17ad24 | |
118 |
|
115 | |||
119 | rename nonexistent bookmark |
|
116 | rename nonexistent bookmark | |
120 |
|
117 | |||
121 | $ hg bookmark -m A B |
|
118 | $ hg bookmark -m A B | |
122 | abort: a bookmark of this name does not exist |
|
119 | abort: a bookmark of this name does not exist | |
123 | [255] |
|
120 | [255] | |
124 |
|
121 | |||
125 | rename to existent bookmark |
|
122 | rename to existent bookmark | |
126 |
|
123 | |||
127 | $ hg bookmark -m X Y |
|
124 | $ hg bookmark -m X Y | |
128 | abort: a bookmark of the same name already exists |
|
125 | abort: a bookmark of the same name already exists | |
129 | [255] |
|
126 | [255] | |
130 |
|
127 | |||
131 | force rename to existent bookmark |
|
128 | force rename to existent bookmark | |
132 |
|
129 | |||
133 | $ hg bookmark -f -m X Y |
|
130 | $ hg bookmark -f -m X Y | |
134 |
|
131 | |||
135 | list bookmarks |
|
132 | list bookmarks | |
136 |
|
133 | |||
137 | $ hg bookmark |
|
134 | $ hg bookmark | |
138 | X2 1:925d80f479bb |
|
135 | X2 1:925d80f479bb | |
139 | * Y 2:db815d6d32e6 |
|
136 | * Y 2:db815d6d32e6 | |
140 | Z 0:f7b1eb17ad24 |
|
137 | Z 0:f7b1eb17ad24 | |
141 |
|
138 | |||
142 | rename without new name |
|
139 | rename without new name | |
143 |
|
140 | |||
144 | $ hg bookmark -m Y |
|
141 | $ hg bookmark -m Y | |
145 | abort: new bookmark name required |
|
142 | abort: new bookmark name required | |
146 | [255] |
|
143 | [255] | |
147 |
|
144 | |||
148 | delete without name |
|
145 | delete without name | |
149 |
|
146 | |||
150 | $ hg bookmark -d |
|
147 | $ hg bookmark -d | |
151 | abort: bookmark name required |
|
148 | abort: bookmark name required | |
152 | [255] |
|
149 | [255] | |
153 |
|
150 | |||
154 | delete nonexistent bookmark |
|
151 | delete nonexistent bookmark | |
155 |
|
152 | |||
156 | $ hg bookmark -d A |
|
153 | $ hg bookmark -d A | |
157 | abort: a bookmark of this name does not exist |
|
154 | abort: a bookmark of this name does not exist | |
158 | [255] |
|
155 | [255] | |
159 |
|
156 | |||
160 | bookmark name with spaces should be stripped |
|
157 | bookmark name with spaces should be stripped | |
161 |
|
158 | |||
162 | $ hg bookmark ' x y ' |
|
159 | $ hg bookmark ' x y ' | |
163 |
|
160 | |||
164 | list bookmarks |
|
161 | list bookmarks | |
165 |
|
162 | |||
166 | $ hg bookmarks |
|
163 | $ hg bookmarks | |
167 | X2 1:925d80f479bb |
|
164 | X2 1:925d80f479bb | |
168 | Y 2:db815d6d32e6 |
|
165 | Y 2:db815d6d32e6 | |
169 | Z 0:f7b1eb17ad24 |
|
166 | Z 0:f7b1eb17ad24 | |
170 | * x y 2:db815d6d32e6 |
|
167 | * x y 2:db815d6d32e6 | |
171 |
|
168 | |||
172 | look up stripped bookmark name |
|
169 | look up stripped bookmark name | |
173 |
|
170 | |||
174 | $ hg log -r '"x y"' |
|
171 | $ hg log -r '"x y"' | |
175 | changeset: 2:db815d6d32e6 |
|
172 | changeset: 2:db815d6d32e6 | |
176 | bookmark: Y |
|
173 | bookmark: Y | |
177 | bookmark: x y |
|
174 | bookmark: x y | |
178 | tag: tip |
|
175 | tag: tip | |
179 | parent: 0:f7b1eb17ad24 |
|
176 | parent: 0:f7b1eb17ad24 | |
180 | user: test |
|
177 | user: test | |
181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
178 | date: Thu Jan 01 00:00:00 1970 +0000 | |
182 | summary: 2 |
|
179 | summary: 2 | |
183 |
|
180 | |||
184 |
|
181 | |||
185 | reject bookmark name with newline |
|
182 | reject bookmark name with newline | |
186 |
|
183 | |||
187 | $ hg bookmark ' |
|
184 | $ hg bookmark ' | |
188 | > ' |
|
185 | > ' | |
189 | abort: bookmark name cannot contain newlines |
|
186 | abort: bookmark name cannot contain newlines | |
190 | [255] |
|
187 | [255] | |
191 |
|
188 | |||
192 | bookmark with existing name |
|
189 | bookmark with existing name | |
193 |
|
190 | |||
194 | $ hg bookmark Z |
|
191 | $ hg bookmark Z | |
195 | abort: a bookmark of the same name already exists |
|
192 | abort: a bookmark of the same name already exists | |
196 | [255] |
|
193 | [255] | |
197 |
|
194 | |||
198 | force bookmark with existing name |
|
195 | force bookmark with existing name | |
199 |
|
196 | |||
200 | $ hg bookmark -f Z |
|
197 | $ hg bookmark -f Z | |
201 |
|
198 | |||
202 | list bookmarks |
|
199 | list bookmarks | |
203 |
|
200 | |||
204 | $ hg bookmark |
|
201 | $ hg bookmark | |
205 | X2 1:925d80f479bb |
|
202 | X2 1:925d80f479bb | |
206 | Y 2:db815d6d32e6 |
|
203 | Y 2:db815d6d32e6 | |
207 | * Z 2:db815d6d32e6 |
|
204 | * Z 2:db815d6d32e6 | |
208 | x y 2:db815d6d32e6 |
|
205 | x y 2:db815d6d32e6 | |
209 |
|
206 | |||
210 | revision but no bookmark name |
|
207 | revision but no bookmark name | |
211 |
|
208 | |||
212 | $ hg bookmark -r . |
|
209 | $ hg bookmark -r . | |
213 | abort: bookmark name required |
|
210 | abort: bookmark name required | |
214 | [255] |
|
211 | [255] | |
215 |
|
212 | |||
216 | bookmark name with whitespace only |
|
213 | bookmark name with whitespace only | |
217 |
|
214 | |||
218 | $ hg bookmark ' ' |
|
215 | $ hg bookmark ' ' | |
219 | abort: bookmark names cannot consist entirely of whitespace |
|
216 | abort: bookmark names cannot consist entirely of whitespace | |
220 | [255] |
|
217 | [255] | |
221 |
|
218 | |||
222 | invalid bookmark |
|
219 | invalid bookmark | |
223 |
|
220 | |||
224 | $ hg bookmark 'foo:bar' |
|
221 | $ hg bookmark 'foo:bar' | |
225 | abort: bookmark 'foo:bar' contains illegal character |
|
222 | abort: bookmark 'foo:bar' contains illegal character | |
226 | [255] |
|
223 | [255] | |
227 |
|
224 | |||
228 | test summary |
|
225 | test summary | |
229 |
|
226 | |||
230 | $ hg summary |
|
227 | $ hg summary | |
231 | parent: 2:db815d6d32e6 tip Y Z x y |
|
228 | parent: 2:db815d6d32e6 tip Y Z x y | |
232 | 2 |
|
229 | 2 | |
233 | branch: default |
|
230 | branch: default | |
234 | commit: (clean) |
|
231 | commit: (clean) | |
235 | update: 1 new changesets, 2 branch heads (merge) |
|
232 | update: 1 new changesets, 2 branch heads (merge) | |
236 |
|
233 |
@@ -1,298 +1,291 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | This test tries to exercise the ssh functionality with a dummy script |
|
3 | This test tries to exercise the ssh functionality with a dummy script | |
4 |
|
4 | |||
5 | $ cat <<EOF > dummyssh |
|
5 | $ cat <<EOF > dummyssh | |
6 | > import sys |
|
6 | > import sys | |
7 | > import os |
|
7 | > import os | |
8 | > |
|
8 | > | |
9 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
9 | > os.chdir(os.path.dirname(sys.argv[0])) | |
10 | > if sys.argv[1] != "user@dummy": |
|
10 | > if sys.argv[1] != "user@dummy": | |
11 | > sys.exit(-1) |
|
11 | > sys.exit(-1) | |
12 | > |
|
12 | > | |
13 | > if not os.path.exists("dummyssh"): |
|
13 | > if not os.path.exists("dummyssh"): | |
14 | > sys.exit(-1) |
|
14 | > sys.exit(-1) | |
15 | > |
|
15 | > | |
16 | > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
16 | > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" | |
17 | > |
|
17 | > | |
18 | > log = open("dummylog", "ab") |
|
18 | > log = open("dummylog", "ab") | |
19 | > log.write("Got arguments") |
|
19 | > log.write("Got arguments") | |
20 | > for i, arg in enumerate(sys.argv[1:]): |
|
20 | > for i, arg in enumerate(sys.argv[1:]): | |
21 | > log.write(" %d:%s" % (i+1, arg)) |
|
21 | > log.write(" %d:%s" % (i+1, arg)) | |
22 | > log.write("\n") |
|
22 | > log.write("\n") | |
23 | > log.close() |
|
23 | > log.close() | |
24 | > r = os.system(sys.argv[2]) |
|
24 | > r = os.system(sys.argv[2]) | |
25 | > sys.exit(bool(r)) |
|
25 | > sys.exit(bool(r)) | |
26 | > EOF |
|
26 | > EOF | |
27 | $ cat <<EOF > badhook |
|
27 | $ cat <<EOF > badhook | |
28 | > import sys |
|
28 | > import sys | |
29 | > sys.stdout.write("KABOOM\n") |
|
29 | > sys.stdout.write("KABOOM\n") | |
30 | > EOF |
|
30 | > EOF | |
31 |
|
31 | |||
32 | creating 'remote |
|
32 | creating 'remote | |
33 |
|
33 | |||
34 | $ hg init remote |
|
34 | $ hg init remote | |
35 | $ cd remote |
|
35 | $ cd remote | |
36 | $ echo this > foo |
|
36 | $ echo this > foo | |
37 | $ echo this > fooO |
|
37 | $ echo this > fooO | |
38 | $ hg ci -A -m "init" foo fooO |
|
38 | $ hg ci -A -m "init" foo fooO | |
39 | $ echo <<EOF > .hg/hgrc |
|
39 | $ echo <<EOF > .hg/hgrc | |
40 | > [server] |
|
40 | > [server] | |
41 | > uncompressed = True |
|
41 | > uncompressed = True | |
42 | > |
|
42 | > | |
43 | > [extensions] |
|
|||
44 | > bookmarks = |
|
|||
45 | > |
|
|||
46 | > [hooks] |
|
43 | > [hooks] | |
47 | > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog |
|
44 | > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog | |
48 | > EOF |
|
45 | > EOF | |
49 | $ cd .. |
|
46 | $ cd .. | |
50 |
|
47 | |||
51 | repo not found error |
|
48 | repo not found error | |
52 |
|
49 | |||
53 | $ hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local |
|
50 | $ hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local | |
54 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
51 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
55 | abort: no suitable response from remote hg! |
|
52 | abort: no suitable response from remote hg! | |
56 | [255] |
|
53 | [255] | |
57 |
|
54 | |||
58 | non-existent absolute path |
|
55 | non-existent absolute path | |
59 |
|
56 | |||
60 | $ hg clone -e "python ./dummyssh" ssh://user@dummy//`pwd`/nonexistent local |
|
57 | $ hg clone -e "python ./dummyssh" ssh://user@dummy//`pwd`/nonexistent local | |
61 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
58 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
62 | abort: no suitable response from remote hg! |
|
59 | abort: no suitable response from remote hg! | |
63 | [255] |
|
60 | [255] | |
64 |
|
61 | |||
65 | clone remote via stream |
|
62 | clone remote via stream | |
66 |
|
63 | |||
67 | $ hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream |
|
64 | $ hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream | |
68 | streaming all changes |
|
65 | streaming all changes | |
69 | 4 files to transfer, 392 bytes of data |
|
66 | 4 files to transfer, 392 bytes of data | |
70 | transferred 392 bytes in * seconds (*/sec) (glob) |
|
67 | transferred 392 bytes in * seconds (*/sec) (glob) | |
71 | updating to branch default |
|
68 | updating to branch default | |
72 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
69 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | $ cd local-stream |
|
70 | $ cd local-stream | |
74 | $ hg verify |
|
71 | $ hg verify | |
75 | checking changesets |
|
72 | checking changesets | |
76 | checking manifests |
|
73 | checking manifests | |
77 | crosschecking files in changesets and manifests |
|
74 | crosschecking files in changesets and manifests | |
78 | checking files |
|
75 | checking files | |
79 | 2 files, 1 changesets, 2 total revisions |
|
76 | 2 files, 1 changesets, 2 total revisions | |
80 | $ cd .. |
|
77 | $ cd .. | |
81 |
|
78 | |||
82 | clone remote via pull |
|
79 | clone remote via pull | |
83 |
|
80 | |||
84 | $ hg clone -e "python ./dummyssh" ssh://user@dummy/remote local |
|
81 | $ hg clone -e "python ./dummyssh" ssh://user@dummy/remote local | |
85 | requesting all changes |
|
82 | requesting all changes | |
86 | adding changesets |
|
83 | adding changesets | |
87 | adding manifests |
|
84 | adding manifests | |
88 | adding file changes |
|
85 | adding file changes | |
89 | added 1 changesets with 2 changes to 2 files |
|
86 | added 1 changesets with 2 changes to 2 files | |
90 | updating to branch default |
|
87 | updating to branch default | |
91 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 |
|
89 | |||
93 | verify |
|
90 | verify | |
94 |
|
91 | |||
95 | $ cd local |
|
92 | $ cd local | |
96 | $ hg verify |
|
93 | $ hg verify | |
97 | checking changesets |
|
94 | checking changesets | |
98 | checking manifests |
|
95 | checking manifests | |
99 | crosschecking files in changesets and manifests |
|
96 | crosschecking files in changesets and manifests | |
100 | checking files |
|
97 | checking files | |
101 | 2 files, 1 changesets, 2 total revisions |
|
98 | 2 files, 1 changesets, 2 total revisions | |
102 | $ echo '[hooks]' >> .hg/hgrc |
|
99 | $ echo '[hooks]' >> .hg/hgrc | |
103 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc |
|
100 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc | |
104 |
|
101 | |||
105 | empty default pull |
|
102 | empty default pull | |
106 |
|
103 | |||
107 | $ hg paths |
|
104 | $ hg paths | |
108 | default = ssh://user@dummy/remote |
|
105 | default = ssh://user@dummy/remote | |
109 | $ hg pull -e "python ../dummyssh" |
|
106 | $ hg pull -e "python ../dummyssh" | |
110 | pulling from ssh://user@dummy/remote |
|
107 | pulling from ssh://user@dummy/remote | |
111 | searching for changes |
|
108 | searching for changes | |
112 | no changes found |
|
109 | no changes found | |
113 |
|
110 | |||
114 | local change |
|
111 | local change | |
115 |
|
112 | |||
116 | $ echo bleah > foo |
|
113 | $ echo bleah > foo | |
117 | $ hg ci -m "add" |
|
114 | $ hg ci -m "add" | |
118 |
|
115 | |||
119 | updating rc |
|
116 | updating rc | |
120 |
|
117 | |||
121 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
118 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
122 | $ echo "[ui]" >> .hg/hgrc |
|
119 | $ echo "[ui]" >> .hg/hgrc | |
123 | $ echo "ssh = python ../dummyssh" >> .hg/hgrc |
|
120 | $ echo "ssh = python ../dummyssh" >> .hg/hgrc | |
124 | $ echo '[extensions]' >> .hg/hgrc |
|
|||
125 | $ echo 'bookmarks =' >> .hg/hgrc |
|
|||
126 |
|
121 | |||
127 | find outgoing |
|
122 | find outgoing | |
128 |
|
123 | |||
129 | $ hg out ssh://user@dummy/remote |
|
124 | $ hg out ssh://user@dummy/remote | |
130 | comparing with ssh://user@dummy/remote |
|
125 | comparing with ssh://user@dummy/remote | |
131 | searching for changes |
|
126 | searching for changes | |
132 | changeset: 1:a28a9d1a809c |
|
127 | changeset: 1:a28a9d1a809c | |
133 | tag: tip |
|
128 | tag: tip | |
134 | user: test |
|
129 | user: test | |
135 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
130 | date: Thu Jan 01 00:00:00 1970 +0000 | |
136 | summary: add |
|
131 | summary: add | |
137 |
|
132 | |||
138 |
|
133 | |||
139 | find incoming on the remote side |
|
134 | find incoming on the remote side | |
140 |
|
135 | |||
141 | $ hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local |
|
136 | $ hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local | |
142 | comparing with ssh://user@dummy/local |
|
137 | comparing with ssh://user@dummy/local | |
143 | searching for changes |
|
138 | searching for changes | |
144 | changeset: 1:a28a9d1a809c |
|
139 | changeset: 1:a28a9d1a809c | |
145 | tag: tip |
|
140 | tag: tip | |
146 | user: test |
|
141 | user: test | |
147 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
142 | date: Thu Jan 01 00:00:00 1970 +0000 | |
148 | summary: add |
|
143 | summary: add | |
149 |
|
144 | |||
150 |
|
145 | |||
151 | find incoming on the remote side (using absolute path) |
|
146 | find incoming on the remote side (using absolute path) | |
152 |
|
147 | |||
153 | $ hg incoming -R ../remote -e "python ../dummyssh" "ssh://user@dummy/`pwd`" |
|
148 | $ hg incoming -R ../remote -e "python ../dummyssh" "ssh://user@dummy/`pwd`" | |
154 | comparing with ssh://user@dummy/$TESTTMP/local |
|
149 | comparing with ssh://user@dummy/$TESTTMP/local | |
155 | searching for changes |
|
150 | searching for changes | |
156 | changeset: 1:a28a9d1a809c |
|
151 | changeset: 1:a28a9d1a809c | |
157 | tag: tip |
|
152 | tag: tip | |
158 | user: test |
|
153 | user: test | |
159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
154 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: add |
|
155 | summary: add | |
161 |
|
156 | |||
162 |
|
157 | |||
163 | push |
|
158 | push | |
164 |
|
159 | |||
165 | $ hg push |
|
160 | $ hg push | |
166 | pushing to ssh://user@dummy/remote |
|
161 | pushing to ssh://user@dummy/remote | |
167 | searching for changes |
|
162 | searching for changes | |
168 | remote: adding changesets |
|
163 | remote: adding changesets | |
169 | remote: adding manifests |
|
164 | remote: adding manifests | |
170 | remote: adding file changes |
|
165 | remote: adding file changes | |
171 | remote: added 1 changesets with 1 changes to 1 files |
|
166 | remote: added 1 changesets with 1 changes to 1 files | |
172 | $ cd ../remote |
|
167 | $ cd ../remote | |
173 |
|
168 | |||
174 | check remote tip |
|
169 | check remote tip | |
175 |
|
170 | |||
176 | $ hg tip |
|
171 | $ hg tip | |
177 | changeset: 1:a28a9d1a809c |
|
172 | changeset: 1:a28a9d1a809c | |
178 | tag: tip |
|
173 | tag: tip | |
179 | user: test |
|
174 | user: test | |
180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
175 | date: Thu Jan 01 00:00:00 1970 +0000 | |
181 | summary: add |
|
176 | summary: add | |
182 |
|
177 | |||
183 | $ hg verify |
|
178 | $ hg verify | |
184 | checking changesets |
|
179 | checking changesets | |
185 | checking manifests |
|
180 | checking manifests | |
186 | crosschecking files in changesets and manifests |
|
181 | crosschecking files in changesets and manifests | |
187 | checking files |
|
182 | checking files | |
188 | 2 files, 2 changesets, 3 total revisions |
|
183 | 2 files, 2 changesets, 3 total revisions | |
189 | $ hg cat -r tip foo |
|
184 | $ hg cat -r tip foo | |
190 | bleah |
|
185 | bleah | |
191 | $ echo z > z |
|
186 | $ echo z > z | |
192 | $ hg ci -A -m z z |
|
187 | $ hg ci -A -m z z | |
193 | created new head |
|
188 | created new head | |
194 |
|
189 | |||
195 | test pushkeys and bookmarks |
|
190 | test pushkeys and bookmarks | |
196 |
|
191 | |||
197 | $ cd ../local |
|
192 | $ cd ../local | |
198 | $ echo '[extensions]' >> ../remote/.hg/hgrc |
|
|||
199 | $ echo 'bookmarks =' >> ../remote/.hg/hgrc |
|
|||
200 | $ hg debugpushkey --config ui.ssh="python ../dummyssh" ssh://user@dummy/remote namespaces |
|
193 | $ hg debugpushkey --config ui.ssh="python ../dummyssh" ssh://user@dummy/remote namespaces | |
201 | bookmarks |
|
194 | bookmarks | |
202 | namespaces |
|
195 | namespaces | |
203 | $ hg book foo -r 0 |
|
196 | $ hg book foo -r 0 | |
204 | $ hg out -B |
|
197 | $ hg out -B | |
205 | comparing with ssh://user@dummy/remote |
|
198 | comparing with ssh://user@dummy/remote | |
206 | searching for changed bookmarks |
|
199 | searching for changed bookmarks | |
207 | foo 1160648e36ce |
|
200 | foo 1160648e36ce | |
208 | $ hg push -B foo |
|
201 | $ hg push -B foo | |
209 | pushing to ssh://user@dummy/remote |
|
202 | pushing to ssh://user@dummy/remote | |
210 | searching for changes |
|
203 | searching for changes | |
211 | no changes found |
|
204 | no changes found | |
212 | exporting bookmark foo |
|
205 | exporting bookmark foo | |
213 | $ hg debugpushkey --config ui.ssh="python ../dummyssh" ssh://user@dummy/remote bookmarks |
|
206 | $ hg debugpushkey --config ui.ssh="python ../dummyssh" ssh://user@dummy/remote bookmarks | |
214 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
207 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
215 | $ hg book -f foo |
|
208 | $ hg book -f foo | |
216 | $ hg push --traceback |
|
209 | $ hg push --traceback | |
217 | pushing to ssh://user@dummy/remote |
|
210 | pushing to ssh://user@dummy/remote | |
218 | searching for changes |
|
211 | searching for changes | |
219 | no changes found |
|
212 | no changes found | |
220 | updating bookmark foo |
|
213 | updating bookmark foo | |
221 | $ hg book -d foo |
|
214 | $ hg book -d foo | |
222 | $ hg in -B |
|
215 | $ hg in -B | |
223 | comparing with ssh://user@dummy/remote |
|
216 | comparing with ssh://user@dummy/remote | |
224 | searching for changed bookmarks |
|
217 | searching for changed bookmarks | |
225 | foo a28a9d1a809c |
|
218 | foo a28a9d1a809c | |
226 | $ hg book -f -r 0 foo |
|
219 | $ hg book -f -r 0 foo | |
227 | $ hg pull -B foo |
|
220 | $ hg pull -B foo | |
228 | pulling from ssh://user@dummy/remote |
|
221 | pulling from ssh://user@dummy/remote | |
229 | searching for changes |
|
222 | searching for changes | |
230 | no changes found |
|
223 | no changes found | |
231 | updating bookmark foo |
|
224 | updating bookmark foo | |
232 | importing bookmark foo |
|
225 | importing bookmark foo | |
233 | $ hg book -d foo |
|
226 | $ hg book -d foo | |
234 | $ hg push -B foo |
|
227 | $ hg push -B foo | |
235 | pushing to ssh://user@dummy/remote |
|
228 | pushing to ssh://user@dummy/remote | |
236 | searching for changes |
|
229 | searching for changes | |
237 | no changes found |
|
230 | no changes found | |
238 | deleting remote bookmark foo |
|
231 | deleting remote bookmark foo | |
239 |
|
232 | |||
240 | a bad, evil hook that prints to stdout |
|
233 | a bad, evil hook that prints to stdout | |
241 |
|
234 | |||
242 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
235 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
243 | $ echo 'changegroup.stdout = python ../badhook' >> ../remote/.hg/hgrc |
|
236 | $ echo 'changegroup.stdout = python ../badhook' >> ../remote/.hg/hgrc | |
244 | $ echo r > r |
|
237 | $ echo r > r | |
245 | $ hg ci -A -m z r |
|
238 | $ hg ci -A -m z r | |
246 |
|
239 | |||
247 | push should succeed even though it has an unexpected response |
|
240 | push should succeed even though it has an unexpected response | |
248 |
|
241 | |||
249 | $ hg push |
|
242 | $ hg push | |
250 | pushing to ssh://user@dummy/remote |
|
243 | pushing to ssh://user@dummy/remote | |
251 | searching for changes |
|
244 | searching for changes | |
252 | note: unsynced remote changes! |
|
245 | note: unsynced remote changes! | |
253 | remote: adding changesets |
|
246 | remote: adding changesets | |
254 | remote: adding manifests |
|
247 | remote: adding manifests | |
255 | remote: adding file changes |
|
248 | remote: adding file changes | |
256 | remote: added 1 changesets with 1 changes to 1 files |
|
249 | remote: added 1 changesets with 1 changes to 1 files | |
257 | remote: KABOOM |
|
250 | remote: KABOOM | |
258 | $ hg -R ../remote heads |
|
251 | $ hg -R ../remote heads | |
259 | changeset: 3:1383141674ec |
|
252 | changeset: 3:1383141674ec | |
260 | tag: tip |
|
253 | tag: tip | |
261 | parent: 1:a28a9d1a809c |
|
254 | parent: 1:a28a9d1a809c | |
262 | user: test |
|
255 | user: test | |
263 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
256 | date: Thu Jan 01 00:00:00 1970 +0000 | |
264 | summary: z |
|
257 | summary: z | |
265 |
|
258 | |||
266 | changeset: 2:6c0482d977a3 |
|
259 | changeset: 2:6c0482d977a3 | |
267 | parent: 0:1160648e36ce |
|
260 | parent: 0:1160648e36ce | |
268 | user: test |
|
261 | user: test | |
269 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
262 | date: Thu Jan 01 00:00:00 1970 +0000 | |
270 | summary: z |
|
263 | summary: z | |
271 |
|
264 | |||
272 |
|
265 | |||
273 | passwords in ssh urls are not supported |
|
266 | passwords in ssh urls are not supported | |
274 |
|
267 | |||
275 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
268 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
276 | abort: password in URL not supported! |
|
269 | abort: password in URL not supported! | |
277 | [255] |
|
270 | [255] | |
278 |
|
271 | |||
279 | $ cd .. |
|
272 | $ cd .. | |
280 | $ cat dummylog |
|
273 | $ cat dummylog | |
281 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
274 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
282 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
275 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
283 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
276 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
284 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
277 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
285 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
278 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
286 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
279 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
287 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
280 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
288 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
281 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
289 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
282 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
290 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
283 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
291 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
284 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
292 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
285 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
293 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
286 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
294 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
287 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
295 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
288 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
296 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
289 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
297 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
290 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
298 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
291 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
General Comments 0
You need to be logged in to leave comments.
Login now