##// END OF EJS Templates
tests: test changegroup generation for filtered changesets (issue4982)...
Gregory Szorc -
r27227:f2053362 stable
parent child Browse files
Show More
@@ -1,85 +1,158 b''
1 Test changesets filtering during exchanges (some tests are still in
1 Test changesets filtering during exchanges (some tests are still in
2 test-obsolete.t)
2 test-obsolete.t)
3
3
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > evolution=createmarkers
6 > evolution=createmarkers
7 > EOF
7 > EOF
8
8
9 Push does not corrupt remote
9 Push does not corrupt remote
10 ----------------------------
10 ----------------------------
11
11
12 Create a DAG where a changeset reuses a revision from a file first used in an
12 Create a DAG where a changeset reuses a revision from a file first used in an
13 extinct changeset.
13 extinct changeset.
14
14
15 $ hg init local
15 $ hg init local
16 $ cd local
16 $ cd local
17 $ echo 'base' > base
17 $ echo 'base' > base
18 $ hg commit -Am base
18 $ hg commit -Am base
19 adding base
19 adding base
20 $ echo 'A' > A
20 $ echo 'A' > A
21 $ hg commit -Am A
21 $ hg commit -Am A
22 adding A
22 adding A
23 $ hg up 0
23 $ hg up 0
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
25 $ hg revert -ar 1
25 $ hg revert -ar 1
26 adding A
26 adding A
27 $ hg commit -Am "A'"
27 $ hg commit -Am "A'"
28 created new head
28 created new head
29 $ hg log -G --template='{desc} {node}'
29 $ hg log -G --template='{desc} {node}'
30 @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
30 @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
31 |
31 |
32 | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a
32 | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a
33 |/
33 |/
34 o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3
34 o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3
35
35
36 $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
36 $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
37
37
38 Push it. The bundle should not refer to the extinct changeset.
38 Push it. The bundle should not refer to the extinct changeset.
39
39
40 $ hg init ../other
40 $ hg init ../other
41 $ hg push ../other
41 $ hg push ../other
42 pushing to ../other
42 pushing to ../other
43 searching for changes
43 searching for changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 2 changesets with 2 changes to 2 files
47 added 2 changesets with 2 changes to 2 files
48 $ hg -R ../other verify
48 $ hg -R ../other verify
49 checking changesets
49 checking changesets
50 checking manifests
50 checking manifests
51 crosschecking files in changesets and manifests
51 crosschecking files in changesets and manifests
52 checking files
52 checking files
53 2 files, 2 changesets, 2 total revisions
53 2 files, 2 changesets, 2 total revisions
54
54
55 Adding a changeset going extinct locally
55 Adding a changeset going extinct locally
56 ------------------------------------------
56 ------------------------------------------
57
57
58 Pull a changeset that will immediatly goes extinct (because you already have a
58 Pull a changeset that will immediatly goes extinct (because you already have a
59 marker to obsolete him)
59 marker to obsolete him)
60 (test resolution of issue3788)
60 (test resolution of issue3788)
61
61
62 $ hg phase --draft --force f89bcc95eba5
62 $ hg phase --draft --force f89bcc95eba5
63 $ hg phase -R ../other --draft --force f89bcc95eba5
63 $ hg phase -R ../other --draft --force f89bcc95eba5
64 $ hg commit --amend -m "A''"
64 $ hg commit --amend -m "A''"
65 $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
65 $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
66 $ hg pull ../other
66 $ hg pull ../other
67 pulling from ../other
67 pulling from ../other
68 searching for changes
68 searching for changes
69 adding changesets
69 adding changesets
70 adding manifests
70 adding manifests
71 adding file changes
71 adding file changes
72 added 1 changesets with 0 changes to 1 files (+1 heads)
72 added 1 changesets with 0 changes to 1 files (+1 heads)
73 (run 'hg heads' to see heads, 'hg merge' to merge)
73 (run 'hg heads' to see heads, 'hg merge' to merge)
74
74
75 check that bundle is not affected
75 check that bundle is not affected
76
76
77 $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5.hg
77 $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5.hg
78 1 changesets found
78 1 changesets found
79 $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
79 $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
80 $ hg unbundle ../f89bcc95eba5.hg
80 $ hg unbundle ../f89bcc95eba5.hg
81 adding changesets
81 adding changesets
82 adding manifests
82 adding manifests
83 adding file changes
83 adding file changes
84 added 1 changesets with 0 changes to 1 files (+1 heads)
84 added 1 changesets with 0 changes to 1 files (+1 heads)
85 (run 'hg heads' to see heads)
85 (run 'hg heads' to see heads)
86 $ cd ..
87
88 pull does not fetch excessive changesets when common node is hidden (issue4982)
89 -------------------------------------------------------------------------------
90
91 initial repo with server and client matching
92
93 $ hg init pull-hidden-common
94 $ cd pull-hidden-common
95 $ touch foo
96 $ hg -q commit -A -m initial
97 $ echo 1 > foo
98 $ hg commit -m 1
99 $ echo 2a > foo
100 $ hg commit -m 2a
101 $ cd ..
102 $ hg clone --pull pull-hidden-common pull-hidden-common-client
103 requesting all changes
104 adding changesets
105 adding manifests
106 adding file changes
107 added 3 changesets with 3 changes to 1 files
108 updating to branch default
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
110
111 server obsoletes the old head
112
113 $ cd pull-hidden-common
114 $ hg -q up -r 1
115 $ echo 2b > foo
116 $ hg -q commit -m 2b
117 $ hg debugobsolete 6a29ed9c68defff1a139e5c6fa9696fb1a75783d bec0734cd68e84477ba7fc1d13e6cff53ab70129
118 $ cd ..
119
120 client only pulls down 1 changeset
121 ("all local heads known remotely" may change if the wire protocol discovery
122 commands ever stop saying they have hidden changesets)
123
124 $ cd pull-hidden-common-client
125 $ hg pull --debug
126 pulling from $TESTTMP/pull-hidden-common (glob)
127 query 1; heads
128 searching for changes
129 all local heads known remotely
130 3 changesets found
131 list of changesets:
132 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
133 a33779fdfc23063680fc31e9ff637dff6876d3d2
134 bec0734cd68e84477ba7fc1d13e6cff53ab70129
135 listing keys for "phase"
136 listing keys for "bookmarks"
137 bundle2-output-bundle: "HG20", 3 parts total
138 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
139 bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
140 bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
141 bundle2-input-bundle: with-transaction
142 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
143 adding changesets
144 add changeset 96ee1d7354c4
145 add changeset a33779fdfc23
146 add changeset bec0734cd68e
147 adding manifests
148 adding file changes
149 adding foo revisions
150 added 1 changesets with 1 changes to 1 files (+1 heads)
151 bundle2-input-part: total payload size 1378
152 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
153 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
154 bundle2-input-bundle: 2 parts total
155 checking for updated bookmarks
156 listing keys for "phases"
157 updating the branch cache
158 (run 'hg heads' to see heads, 'hg merge' to merge)
General Comments 0
You need to be logged in to leave comments. Login now