Mercurial > evolve
annotate tests/test-exchange-D3.t @ 1078:5717d023da63
obsexc: use the common discovery
We drop the hand made discovery and rely on the general one introduced some time
ago.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 27 Aug 2014 17:09:36 +0200 |
parents | 5d063fed9e3d |
children | 528c066cd51c |
rev | line source |
---|---|
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 Initial setup |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 $ . $TESTDIR/_exc-util.sh |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 === D.2 missing prune target (prune in "pushed set") === |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 {{{ |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 }}} |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 Marker exist from: |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
15 * A' succeed to A |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 * A' (prune) |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 Command run: |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 * hg push |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 Expected exchange: |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
23 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
24 * `A ø⇠o A'` |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
25 * A' (prune) |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
26 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
28 $ setuprepos D.2 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 creating test repo for test case D.2 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
30 - pulldest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
31 - main |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
32 - pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
33 cd into `main` and proceed with env setup |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
34 $ cd main |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
35 $ mkcommit A0 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
36 $ hg up -q 0 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
37 $ mkcommit B |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
38 created new head |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
39 $ mkcommit A1 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
40 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
41 $ hg prune -d '0 0' . |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
42 1 changesets pruned |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
43 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
44 working directory now at 35b183996678 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
45 $ hg strip --hidden -q 'desc(A1)' |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
46 $ hg log -G --hidden |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
47 @ 35b183996678 (draft): B |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
48 | |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
49 | x 28b51eb45704 (draft): A0 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
50 |/ |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
51 o a9bdc8b26820 (public): O |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
52 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
53 $ hg debugobsolete |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1060
diff
changeset
|
54 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
55 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
56 $ cd .. |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
57 $ cd .. |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
58 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
59 Actual Test |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
60 ------------------------------------- |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
61 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
62 $ dotest D.2 O |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
63 ## Running testcase D.2 |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
64 # testing echange of "O" (a9bdc8b26820) |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
65 ## initial state |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
66 # obstore: main |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1060
diff
changeset
|
67 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
68 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
69 # obstore: pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
70 # obstore: pulldest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
71 ## pushing "O" from main to pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
72 pushing to pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
73 searching for changes |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
74 OBSEXC: computing relevant nodes |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
75 OBSEXC: computing markers relevant to 1 nodes |
1078
5717d023da63
obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1067
diff
changeset
|
76 no changes found |
864
401da1b38cca
discovery: implement a discovery process and use it for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
850
diff
changeset
|
77 OBSEXC: no marker to push |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
78 OBSEXC: DONE |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
79 ## post push state |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
80 # obstore: main |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1060
diff
changeset
|
81 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
82 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
83 # obstore: pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
84 # obstore: pulldest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
85 ## pulling "a9bdc8b26820" from main into pulldest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
86 pulling from main |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
87 no changes found |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
88 OBSEXC: pull obsolescence markers |
865
5c40b2a4b52f
discovery: use the discovery process for pull
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
864
diff
changeset
|
89 OBSEXC: no unknown remote markers |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
90 OBSEXC: DONE |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
91 ## post pull state |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
92 # obstore: main |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1060
diff
changeset
|
93 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
94 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
850
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
95 # obstore: pushdest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
96 # obstore: pulldest |
3618454a4da0
exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
97 |