annotate tests/test-exchange-D3.t @ 2228:3b18440cca74

debugstablerange: improve output spacing On repo with a descent amount of changeset the number where overflowing in all directions. We give use more room now.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 24 Mar 2017 09:40:50 +0100
parents d0bc98161794
children 575561934439
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2118
d0bc98161794 tests: move exchange utility in testlib
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2083
diff changeset
6 $ . $TESTDIR/testlib/exchange-util.sh
850
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 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
43 working directory now at 35b183996678
1239
8a06b32061ce evolve: apply prune update before creating obsolescence markers
Laurent Charignon <lcharignon@fb.com>
parents: 1093
diff changeset
44 1 changesets pruned
850
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'}
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
56 $ hg debugobsrelsethashtree
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
57 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
58 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
59 35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1239
diff changeset
60 $ hg debugstablerange --rev 'head()'
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
61 rev node index size depth obshash
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
62 2 35b183996678 0 2 2 65a9f21dff07
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
63 2 35b183996678 1 1 2 65a9f21dff07
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
64 0 a9bdc8b26820 0 1 1 000000000000
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 $ cd ..
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 $ cd ..
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 Actual Test
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 -------------------------------------
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 $ dotest D.2 O
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 ## Running testcase D.2
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 # testing echange of "O" (a9bdc8b26820)
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 ## initial state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 # 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
76 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
77 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
78 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 ## 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
81 pushing to pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
83 no changes found
850
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 ## post push state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 # 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
86 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
87 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
88 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 ## 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
91 pulling from main
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 no changes found
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 ## post pull state
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 # 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
95 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
96 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
97 # obstore: pushdest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 # obstore: pulldest
3618454a4da0 exchange: add test case for D.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99