Mercurial > evolve
annotate tests/test-exchange-B7.t @ 1410:2c451fece7a6
evolve: unify revision handling and rework error message
This changesets do a massive refactoring of the way evolve select changesets to
be evolve. We now use a two stages approach:
1) read command line argument and produce a list of revision to evolve.
2) evolve all these revisions.
This allow a much cleaner, robust and extensible code. In the process the error
message issued when there is nothing to evolve have been updated to informs
about other troubles in the repository and point at useful option to solve them.
The 'update' case is handled independently at the start of the function.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 14:26:33 -0700 |
parents | a49f2e7a2755 |
children | 778afb036245 |
rev | line source |
---|---|
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 Initial setup |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 $ . $TESTDIR/_exc-util.sh |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 |
984
b286f77d680c
tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents:
865
diff
changeset
|
7 === B.7 Prune on non-targeted common changeset === |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 .. {{{ |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 .. β B |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 .. | |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 .. β A |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 .. | |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 .. β O |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
15 .. }}} |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 .. Marker exist from: |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 .. * B (prune) |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 .. Command run: |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
23 .. * hg push -r O |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
24 ........ * hg push |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
25 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
26 .. Expected exchange: |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
28 .. * ΓΈ |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 ....... * B (prune) |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
30 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
31 $ setuprepos B.7 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
32 creating test repo for test case B.7 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
33 - pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
34 - main |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
35 - pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
36 cd into `main` and proceed with env setup |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
37 $ cd main |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
38 $ mkcommit A |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
39 $ hg push -q ../pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
40 $ hg push -q ../pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
41 $ mkcommit B |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
42 $ hg prune -qd '0 0' . |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
43 $ hg log -G --hidden |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
44 x f6fbb35d8ac9 (draft): B |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
45 | |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
46 @ f5bc6836db60 (draft): A |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
47 | |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
48 o a9bdc8b26820 (public): O |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
49 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
50 $ hg debugobsolete |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
51 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
52 $ cd .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
53 $ cd .. |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
54 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
55 Actual Test |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
56 ------------------------------------- |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
57 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
58 $ dotest B.7 O |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
59 ## Running testcase B.7 |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
60 # testing echange of "O" (a9bdc8b26820) |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
61 ## initial state |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
62 # obstore: main |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
63 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
64 # obstore: pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
65 # obstore: pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
66 ## pushing "O" from main to pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
67 pushing to pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
68 searching for changes |
1078
5717d023da63
obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1067
diff
changeset
|
69 no changes found |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
70 ## post push state |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
71 # obstore: main |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
72 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
73 # obstore: pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
74 # obstore: pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
75 ## pulling "a9bdc8b26820" from main into pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
76 pulling from main |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
77 no changes found |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
78 ## post pull state |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
79 # obstore: main |
1067
5d063fed9e3d
evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1065
diff
changeset
|
80 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
843
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
81 # obstore: pushdest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
82 # obstore: pulldest |
ee910ba7a9db
exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
83 |