comparison tests/test-push-warn.out @ 10925:a101a743c570 stable

prepush: rewrite most of the code from scratch For servers with branchmap support, the algorithm now works as follows: 1. A list of branches in outgoing changesets is created. 2. Using the remote branchmap, a check for new branches is performed. 3. A map (from branch to head list) of locally known remote heads before the push is created, and one which, after step 4, will contain the locally known remote heads after the push. 4. The post-push head map is updated with the outgoing changesets, using the branch cache update mechanism. 5. A check for new heads is performed, by comparing the length of the head list before and after push, for each branch. If there are new heads, an error depending on whether or not there are incoming changes on the branch, is returned. 6. If the push is allowed, a warning is written if there are incoming changes on any branches involved in the push. For old servers, an algorithm similar to step 4-6 above is used to check for new topological heads only. Two bugs are also fixed: 1. Sometimes you would be allowed to push new branch heads without --force. A test for this case was added. 2. You would get the "note: unsynced remote changes!" warning if there were any incoming changesets, even if they were on unrelated branches.
author Sune Foldager <cryo@cyanite.org>
date Thu, 15 Apr 2010 21:59:21 +0200
parents 29a83fb8c067
children 5b48d819d5f9
comparison
equal deleted inserted replaced
10923:1782278bab8a 10925:a101a743c570
209 comparing with inner 209 comparing with inner
210 searching for changes 210 searching for changes
211 2: A a2 211 2: A a2
212 pushing to inner 212 pushing to inner
213 searching for changes 213 searching for changes
214 note: unsynced remote changes!
215 adding changesets 214 adding changesets
216 adding manifests 215 adding manifests
217 adding file changes 216 adding file changes
218 added 1 changesets with 1 changes to 1 files (+1 heads) 217 added 1 changesets with 1 changes to 1 files (+1 heads)
219 % check prepush with new branch head on former topo head 218 % check prepush with new branch head on former topo head
251 comparing with inner 250 comparing with inner
252 searching for changes 251 searching for changes
253 3: A a2 252 3: A a2
254 pushing to inner 253 pushing to inner
255 searching for changes 254 searching for changes
256 note: unsynced remote changes!
257 adding changesets 255 adding changesets
258 adding manifests 256 adding manifests
259 adding file changes 257 adding file changes
260 added 1 changesets with 1 changes to 1 files 258 added 1 changesets with 1 changes to 1 files
261 % check prepush with new branch head and new child of former branch head 259 % check prepush with new branch head and new child of former branch head
301 5: A b3 299 5: A b3
302 pushing to inner 300 pushing to inner
303 searching for changes 301 searching for changes
304 abort: push creates new remote heads on branch 'A'! 302 abort: push creates new remote heads on branch 'A'!
305 (did you forget to merge? use push -f to force) 303 (did you forget to merge? use push -f to force)
304 pushing to inner
305 searching for changes
306 abort: push creates new remote heads on branch 'A'!
307 (did you forget to merge? use push -f to force)
308 comparing with inner
309 searching for changes
310 no changes found