##// END OF EJS Templates
test-pull-r: explicitly kill server processes...
Joerg Sonnenberger -
r35630:edf52be9 default
parent child Browse files
Show More
@@ -1,146 +1,147 b''
1 $ hg init repo
1 $ hg init repo
2 $ cd repo
2 $ cd repo
3 $ echo foo > foo
3 $ echo foo > foo
4 $ hg ci -qAm 'add foo'
4 $ hg ci -qAm 'add foo'
5 $ echo >> foo
5 $ echo >> foo
6 $ hg ci -m 'change foo'
6 $ hg ci -m 'change foo'
7 $ hg up -qC 0
7 $ hg up -qC 0
8 $ echo bar > bar
8 $ echo bar > bar
9 $ hg ci -qAm 'add bar'
9 $ hg ci -qAm 'add bar'
10
10
11 $ hg log
11 $ hg log
12 changeset: 2:effea6de0384
12 changeset: 2:effea6de0384
13 tag: tip
13 tag: tip
14 parent: 0:bbd179dfa0a7
14 parent: 0:bbd179dfa0a7
15 user: test
15 user: test
16 date: Thu Jan 01 00:00:00 1970 +0000
16 date: Thu Jan 01 00:00:00 1970 +0000
17 summary: add bar
17 summary: add bar
18
18
19 changeset: 1:ed1b79f46b9a
19 changeset: 1:ed1b79f46b9a
20 user: test
20 user: test
21 date: Thu Jan 01 00:00:00 1970 +0000
21 date: Thu Jan 01 00:00:00 1970 +0000
22 summary: change foo
22 summary: change foo
23
23
24 changeset: 0:bbd179dfa0a7
24 changeset: 0:bbd179dfa0a7
25 user: test
25 user: test
26 date: Thu Jan 01 00:00:00 1970 +0000
26 date: Thu Jan 01 00:00:00 1970 +0000
27 summary: add foo
27 summary: add foo
28
28
29 $ cd ..
29 $ cd ..
30
30
31 don't show "(+1 heads)" message when pulling closed head
31 don't show "(+1 heads)" message when pulling closed head
32
32
33 $ hg clone -q repo repo2
33 $ hg clone -q repo repo2
34 $ hg clone -q repo2 repo3
34 $ hg clone -q repo2 repo3
35 $ cd repo2
35 $ cd repo2
36 $ hg up -q 0
36 $ hg up -q 0
37 $ echo hello >> foo
37 $ echo hello >> foo
38 $ hg ci -mx1
38 $ hg ci -mx1
39 created new head
39 created new head
40 $ hg ci -mx2 --close-branch
40 $ hg ci -mx2 --close-branch
41 $ cd ../repo3
41 $ cd ../repo3
42 $ hg heads -q --closed
42 $ hg heads -q --closed
43 2:effea6de0384
43 2:effea6de0384
44 1:ed1b79f46b9a
44 1:ed1b79f46b9a
45 $ hg pull
45 $ hg pull
46 pulling from $TESTTMP/repo2
46 pulling from $TESTTMP/repo2
47 searching for changes
47 searching for changes
48 adding changesets
48 adding changesets
49 adding manifests
49 adding manifests
50 adding file changes
50 adding file changes
51 added 2 changesets with 1 changes to 1 files
51 added 2 changesets with 1 changes to 1 files
52 new changesets 8c900227dd5d:00cfe9073916
52 new changesets 8c900227dd5d:00cfe9073916
53 (run 'hg update' to get a working copy)
53 (run 'hg update' to get a working copy)
54 $ hg heads -q --closed
54 $ hg heads -q --closed
55 4:00cfe9073916
55 4:00cfe9073916
56 2:effea6de0384
56 2:effea6de0384
57 1:ed1b79f46b9a
57 1:ed1b79f46b9a
58
58
59 $ cd ..
59 $ cd ..
60
60
61 $ hg init copy
61 $ hg init copy
62 $ cd copy
62 $ cd copy
63
63
64 Pull a missing revision:
64 Pull a missing revision:
65
65
66 $ hg pull -qr missing ../repo
66 $ hg pull -qr missing ../repo
67 abort: unknown revision 'missing'!
67 abort: unknown revision 'missing'!
68 [255]
68 [255]
69
69
70 Pull multiple revisions with update:
70 Pull multiple revisions with update:
71
71
72 $ hg pull -qu -r 0 -r 1 ../repo
72 $ hg pull -qu -r 0 -r 1 ../repo
73 $ hg -q parents
73 $ hg -q parents
74 0:bbd179dfa0a7
74 0:bbd179dfa0a7
75 $ hg rollback
75 $ hg rollback
76 repository tip rolled back to revision -1 (undo pull)
76 repository tip rolled back to revision -1 (undo pull)
77 working directory now based on revision -1
77 working directory now based on revision -1
78
78
79 $ hg pull -qr 0 ../repo
79 $ hg pull -qr 0 ../repo
80 $ hg log
80 $ hg log
81 changeset: 0:bbd179dfa0a7
81 changeset: 0:bbd179dfa0a7
82 tag: tip
82 tag: tip
83 user: test
83 user: test
84 date: Thu Jan 01 00:00:00 1970 +0000
84 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: add foo
85 summary: add foo
86
86
87 $ hg pull -qr 1 ../repo
87 $ hg pull -qr 1 ../repo
88 $ hg log
88 $ hg log
89 changeset: 1:ed1b79f46b9a
89 changeset: 1:ed1b79f46b9a
90 tag: tip
90 tag: tip
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:00 1970 +0000
92 date: Thu Jan 01 00:00:00 1970 +0000
93 summary: change foo
93 summary: change foo
94
94
95 changeset: 0:bbd179dfa0a7
95 changeset: 0:bbd179dfa0a7
96 user: test
96 user: test
97 date: Thu Jan 01 00:00:00 1970 +0000
97 date: Thu Jan 01 00:00:00 1970 +0000
98 summary: add foo
98 summary: add foo
99
99
100
100
101 This used to abort: received changelog group is empty:
101 This used to abort: received changelog group is empty:
102
102
103 $ hg pull -qr 1 ../repo
103 $ hg pull -qr 1 ../repo
104
104
105 Test race condition with -r and -U (issue4707)
105 Test race condition with -r and -U (issue4707)
106
106
107 We pull '-U -r <name>' and the name change right after/during the changegroup emission.
107 We pull '-U -r <name>' and the name change right after/during the changegroup emission.
108 We use http because http is better is our racy-est option.
108 We use http because http is better is our racy-est option.
109
109
110
110
111 $ echo babar > ../repo/jungle
111 $ echo babar > ../repo/jungle
112 $ cat <<EOF > ../repo/.hg/hgrc
112 $ cat <<EOF > ../repo/.hg/hgrc
113 > [hooks]
113 > [hooks]
114 > outgoing.makecommit = hg ci -Am 'racy commit'; echo committed in pull-race
114 > outgoing.makecommit = hg ci -Am 'racy commit'; echo committed in pull-race
115 > EOF
115 > EOF
116 $ hg serve -R ../repo -p $HGPORT2 -d --pid-file=../repo.pid
116 $ hg serve -R ../repo -p $HGPORT2 -d --pid-file=../repo.pid
117 $ cat ../repo.pid >> $DAEMON_PIDS
117 $ cat ../repo.pid >> $DAEMON_PIDS
118 $ hg pull --rev default --update http://localhost:$HGPORT2/
118 $ hg pull --rev default --update http://localhost:$HGPORT2/
119 pulling from http://localhost:$HGPORT2/
119 pulling from http://localhost:$HGPORT2/
120 searching for changes
120 searching for changes
121 adding changesets
121 adding changesets
122 adding manifests
122 adding manifests
123 adding file changes
123 adding file changes
124 added 1 changesets with 1 changes to 1 files (+1 heads)
124 added 1 changesets with 1 changes to 1 files (+1 heads)
125 new changesets effea6de0384
125 new changesets effea6de0384
126 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 $ hg log -G
127 $ hg log -G
128 @ changeset: 2:effea6de0384
128 @ changeset: 2:effea6de0384
129 | tag: tip
129 | tag: tip
130 | parent: 0:bbd179dfa0a7
130 | parent: 0:bbd179dfa0a7
131 | user: test
131 | user: test
132 | date: Thu Jan 01 00:00:00 1970 +0000
132 | date: Thu Jan 01 00:00:00 1970 +0000
133 | summary: add bar
133 | summary: add bar
134 |
134 |
135 | o changeset: 1:ed1b79f46b9a
135 | o changeset: 1:ed1b79f46b9a
136 |/ user: test
136 |/ user: test
137 | date: Thu Jan 01 00:00:00 1970 +0000
137 | date: Thu Jan 01 00:00:00 1970 +0000
138 | summary: change foo
138 | summary: change foo
139 |
139 |
140 o changeset: 0:bbd179dfa0a7
140 o changeset: 0:bbd179dfa0a7
141 user: test
141 user: test
142 date: Thu Jan 01 00:00:00 1970 +0000
142 date: Thu Jan 01 00:00:00 1970 +0000
143 summary: add foo
143 summary: add foo
144
144
145
145
146 $ cd ..
146 $ cd ..
147 $ killdaemons.py
General Comments 0
You need to be logged in to leave comments. Login now