annotate tests/test-push-checkheads-superceed-A6.t @ 35565:bdae51a83dfb

clonebundle: make it possible to retrieve the initial bundle through largefile By setting the default path early enough, we make it possible to retrieve a clone bundle as a largefile from the repository we are cloning. But... why? Clone bundle is a great feature to speeds up clone of large repository. However one of the main obstacle for clone bundle deployment is the authentication scheme. For non public project, just putting a static file on some random CDN is not an option as we have to make sure people have the proper permission to retrieves the bundle. On the other hand, 'largefiles' already have all the necessary logic to serve arbitrary binary files -after- an authentication checks. So reusing an existing large file infrastructure can be a significant shortcut to clone bundle in this kind of closed environment. The idea might seems strange, but the necessary update to the large file extensions are quite small while the benefits are huge. In addition, since all the extra logic live in the 'largefiles' extensions, core does not have to know anything about it.
author Boris Feld <boris.feld@octobus.net>
date Thu, 21 Dec 2017 13:58:11 +0100
parents 4441705b7111
children 1a09dad8b85a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
1 ====================================
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
2 Testing head checking code: Case A-6
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
3 ====================================
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
4
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
5 Mercurial checks for the introduction of new heads on push. Evolution comes
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
6 into play to detect if existing branches on the server are being replaced by
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
7 some of the new one we push.
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
8
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
9 This case is part of a series of tests checking this behavior.
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
10
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
11 Category A: simple case involving a branch being superceeded by another.
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
12 TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
13
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
14 .. old-state:
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
15 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
16 .. * 2 branch (1-changeset, and 2-changesets)
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
17 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
18 .. new-state:
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
19 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
20 .. * 1 new branch superceeding the base of the old-2-changesets-branch,
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
21 .. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
22 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
23 .. expected-result:
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
24 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
25 .. * push allowed
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
26 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
27 .. graph-summary:
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
28 ..
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
29 .. B'◔⇢ø B
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
30 .. | |
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
31 .. A | ø⇠◔ A'
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
32 .. | |/
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
33 .. C ● |
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
34 .. \|
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
35 .. ●
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
36
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
37 $ . $TESTDIR/testlib/push-checkheads-util.sh
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
38
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
39 Test setup
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
40 ----------
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
41
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
42 $ mkdir A6
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
43 $ cd A6
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
44 $ setuprepos
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
45 creating basic server and client repo
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
46 updating to branch default
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
48 $ cd server
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
49 $ mkcommit B0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
50 $ hg up 0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
51 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
52 $ mkcommit C0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
53 created new head
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
54 $ cd ../client
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
55 $ hg pull
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
56 pulling from $TESTTMP/A6/server
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
57 searching for changes
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
58 adding changesets
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
59 adding manifests
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
60 adding file changes
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
61 added 2 changesets with 2 changes to 2 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33542
diff changeset
62 new changesets d73caddc5533:0f88766e02d6
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
63 (run 'hg heads' to see heads, 'hg merge' to merge)
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
64 $ hg up 0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
65 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
66 $ mkcommit A1
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
67 created new head
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
68 $ hg up 'desc(C0)'
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
69 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
70 $ mkcommit B1
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
71 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
72 obsoleted 1 changesets
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
73 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
74 obsoleted 1 changesets
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
75 $ hg log -G --hidden
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
76 @ d70a1f75a020 (draft): B1
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
77 |
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
78 | o f6082bc4ffef (draft): A1
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
79 | |
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
80 o | 0f88766e02d6 (draft): C0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
81 |/
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
82 | x d73caddc5533 (draft): B0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
83 | |
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
84 | x 8aaa48160adc (draft): A0
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
85 |/
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
86 o 1e4be0697311 (public): root
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
87
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
88
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
89 Actual testing
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
90 --------------
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
91
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
92 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
93 pushing to $TESTTMP/A6/server
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
94 searching for changes
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
95 adding changesets
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
96 adding manifests
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
97 adding file changes
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
98 added 2 changesets with 2 changes to 2 files (+1 heads)
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
99 2 new obsolescence markers
33252
53b3a1968aa6 obsolete: reports the number of local changeset obsoleted when unbundling
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31979
diff changeset
100 obsoleted 2 changesets
31979
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
101
aefe40d95130 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
102 $ cd ../..