author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Tue, 10 Oct 2017 16:22:21 +0200 | |
branch | stable |
changeset 3050 | 6603d5655192 |
parent 2754 | 21f06d932231 |
child 2798 | 2280461343e5 |
child 4840 | 62b60fc1983d |
permissions | -rw-r--r-- |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 |
==================================== |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 |
Testing head checking code: Case A-1 |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 |
==================================== |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
5 |
Mercurial checks for the introduction of new heads on push. Evolution comes |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
6 |
into play to detect if existing branches on the server are being replaced by |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
7 |
some of the new one we push. |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
9 |
This case is part of a series of tests checking this behavior. |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
11 |
Category A: simple case involving a branch being superceeded by another. |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 |
TestCase 1: single-changeset branch |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
|
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 |
.. old-state: |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 |
.. * 1 changeset branch |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 |
.. new-state: |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 |
.. * 1 changeset branch succeeding to A |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 |
.. expected-result: |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 |
.. * push allowed |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 |
.. graph-summary: |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 |
.. |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 |
.. A ø⇠◔ A' |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 |
.. |/ |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
30 |
.. ● |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
32 |
$ . $TESTDIR/testlib/push-checkheads-util.sh |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
33 |
|
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
34 |
Test setup |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
35 |
---------- |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
37 |
$ mkdir A1 |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
38 |
$ cd A1 |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
39 |
$ setuprepos |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
40 |
creating basic server and client repo |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 |
updating to branch default |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 |
$ cd client |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 |
$ hg up 0 |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 |
$ mkcommit A1 |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 |
created new head |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 |
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` |
2754
21f06d932231
test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2710
diff
changeset
|
49 |
obsoleted 1 changesets |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 |
$ hg log -G --hidden |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
51 |
@ f6082bc4ffef (draft): A1 |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 |
| |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 |
| x 8aaa48160adc (draft): A0 |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
54 |
|/ |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
55 |
o 1e4be0697311 (public): root |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 |
|
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
57 |
|
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
58 |
Actual testing |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 |
-------------- |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 |
|
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 |
$ hg push |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
62 |
pushing to $TESTTMP/A1/server (glob) |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
63 |
searching for changes |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
64 |
adding changesets |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
65 |
adding manifests |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
66 |
adding file changes |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 |
added 1 changesets with 1 changes to 1 files (+1 heads) |
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 |
1 new obsolescence markers |
2710
e22de367fc74
compat: adapt to change in 53b3a1968aa6-core
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2277
diff
changeset
|
69 |
obsoleted 1 changesets |
2119
e1c26c632b6d
tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 |
|
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2119
diff
changeset
|
71 |
$ cd ../.. |