comparison tests/test-obsolete.t @ 44:b243c10a5fbe

Add pushkey support for pull and push
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 08 Sep 2011 12:01:38 +0200
parents b9a5a596d9ef
children d89453a10991
comparison
equal deleted inserted replaced
43:20fca307d9f0 44:b243c10a5fbe
2 > [web] 2 > [web]
3 > push_ssl = false 3 > push_ssl = false
4 > allow_push = * 4 > allow_push = *
5 > [extensions] 5 > [extensions]
6 > EOF 6 > EOF
7 $ echo "states=$(echo $(dirname $TESTDIR))/obsolete.py" >> $HGRCPATH 7 $ echo "obsolete=$(echo $(dirname $TESTDIR))/obsolete.py" >> $HGRCPATH
8 $ mkcommit() { 8 $ mkcommit() {
9 > echo "$1" > "$1" 9 > echo "$1" > "$1"
10 > hg add "$1" 10 > hg add "$1"
11 > hg ci -m "add $1" 11 > hg ci -m "add $1"
12 > } 12 > }
13 13
14 $ alias qlog="hg log --template='{rev}\n'"
14 $ hg init local 15 $ hg init local
15 $ cd local 16 $ cd local
16 $ mkcommit a # 0 17 $ mkcommit a # 0
17 $ mkcommit b # 1 18 $ mkcommit b # 1
18 $ mkcommit c # 2 19 $ mkcommit c # 2
116 user: test 117 user: test
117 date: Thu Jan 01 00:00:00 1970 +0000 118 date: Thu Jan 01 00:00:00 1970 +0000
118 summary: add obsol_c 119 summary: add obsol_c
119 120
120 121
122 Test communication of obsolete relation with a compatible client
123
124 $ hg init ../other-new
125 $ hg push ../other-new
126 pushing to ../other-new
127 searching for changes
128 adding changesets
129 adding manifests
130 adding file changes
131 added 6 changesets with 6 changes to 6 files (+2 heads)
132 $ hg -R ../other-new log -r 'obsolete()'
133 changeset: 3:0d3f46688ccc
134 parent: 1:7c3bad9141dc
135 user: test
136 date: Thu Jan 01 00:00:00 1970 +0000
137 summary: add obsol_c
138
139 $ hg -R ../other-new log
140 changeset: 5:a7a6f2b5d8a5
141 tag: tip
142 parent: 3:0d3f46688ccc
143 user: test
144 date: Thu Jan 01 00:00:00 1970 +0000
145 summary: add d
146
147 changeset: 4:725c380fe99b
148 parent: 1:7c3bad9141dc
149 user: test
150 date: Thu Jan 01 00:00:00 1970 +0000
151 summary: add obsol_c'
152
153 changeset: 3:0d3f46688ccc
154 parent: 1:7c3bad9141dc
155 user: test
156 date: Thu Jan 01 00:00:00 1970 +0000
157 summary: add obsol_c
158
159 changeset: 1:7c3bad9141dc
160 user: test
161 date: Thu Jan 01 00:00:00 1970 +0000
162 summary: add b
163
164 changeset: 0:1f0dee641bb7
165 user: test
166 date: Thu Jan 01 00:00:00 1970 +0000
167 summary: add a
168
169 $ hg up 3 -q
170 $ mkcommit obsol_d # 6
171 created new head
172 $ hg debugobsolete 6 5
173 $ qlog
174 6
175 4
176 3
177 1
178 0
179 $ qlog -r 'obsolete()'
180 3
181 $ hg push ../other-new -f # XXX should not have to use -f
182 pushing to ../other-new
183 searching for changes
184 adding changesets
185 adding manifests
186 adding file changes
187 added 1 changesets with 1 changes to 1 files (+1 heads)
188 $ qlog -R ../other-new
189 6
190 4
191 3
192 1
193 0
194 $ qlog -R ../other-new -r 'obsolete()'
195 3
196 $ hg up -q .^
197 $ mkcommit "obsol_d'" # 7
198 created new head
199 $ hg debugobsolete 7 6
200 $ hg pull -R ../other-new .
201 pulling from .
202 searching for changes
203 adding changesets
204 adding manifests
205 adding file changes
206 added 1 changesets with 1 changes to 1 files (+1 heads)
207 (run 'hg heads .' to see heads, 'hg merge' to merge)
208 $ qlog -R ../other-new
209 7
210 4
211 3
212 1
213 0
214
215
216