| 1 |
|
| 2 |
$ hg init repo |
| 3 |
$ cd repo |
| 4 |
$ hg debugbuilddag '+3<3+1' |
| 5 |
|
| 6 |
$ hg log |
| 7 |
changeset: 3:6100d3090acf |
| 8 |
tag: tip |
| 9 |
parent: 0:1ea73414a91b |
| 10 |
user: debugbuilddag |
| 11 |
date: Thu Jan 01 00:00:03 1970 +0000 |
| 12 |
summary: r3 |
| 13 |
|
| 14 |
changeset: 2:01241442b3c2 |
| 15 |
user: debugbuilddag |
| 16 |
date: Thu Jan 01 00:00:02 1970 +0000 |
| 17 |
summary: r2 |
| 18 |
|
| 19 |
changeset: 1:66f7d451a68b |
| 20 |
user: debugbuilddag |
| 21 |
date: Thu Jan 01 00:00:01 1970 +0000 |
| 22 |
summary: r1 |
| 23 |
|
| 24 |
changeset: 0:1ea73414a91b |
| 25 |
user: debugbuilddag |
| 26 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 27 |
summary: r0 |
| 28 |
|
| 29 |
$ cd .. |
| 30 |
|
| 31 |
Test pullbundle functionality |
| 32 |
|
| 33 |
$ cd repo |
| 34 |
$ cat <<EOF > .hg/hgrc |
| 35 |
> [experimental] |
| 36 |
> evolution = True |
| 37 |
> [extensions] |
| 38 |
> blackbox = |
| 39 |
> EOF |
| 40 |
$ hg bundle --base null -r 0 .hg/0.hg |
| 41 |
1 changesets found |
| 42 |
$ hg bundle --base 0 -r 1 .hg/1.hg |
| 43 |
1 changesets found |
| 44 |
$ hg bundle --base 1 -r 2 .hg/2.hg |
| 45 |
1 changesets found |
| 46 |
$ hg bundle --base 1 -r 3 .hg/3.hg |
| 47 |
1 changesets found |
| 48 |
$ cat <<EOF > .hg/pullbundles.manifest |
| 49 |
> 3.hg BUNDLESPEC=none-v2 heads=6100d3090acf50ed11ec23196cec20f5bd7323aa bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e |
| 50 |
> 2.hg BUNDLESPEC=none-v2 heads=01241442b3c2bf3211e593b549c655ea65b295e3 bases=66f7d451a68b85ed82ff5fcc254daf50c74144bd |
| 51 |
> 1.hg BUNDLESPEC=bzip2-v2 heads=66f7d451a68b85ed82ff5fcc254daf50c74144bd bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e |
| 52 |
> 0.hg BUNDLESPEC=gzip-v2 heads=1ea73414a91b0920940797d8fc6a11e447f8ea1e |
| 53 |
> EOF |
| 54 |
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid -E ../error.txt |
| 55 |
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
| 56 |
$ cat ../repo.pid >> $DAEMON_PIDS |
| 57 |
$ cd .. |
| 58 |
$ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle |
| 59 |
adding changesets |
| 60 |
adding manifests |
| 61 |
adding file changes |
| 62 |
added 1 changesets with 0 changes to 0 files |
| 63 |
new changesets 1ea73414a91b (1 drafts) |
| 64 |
updating to branch default |
| 65 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 66 |
$ cat error.txt |
| 67 |
$ cd repo.pullbundle |
| 68 |
$ hg pull -r 1 |
| 69 |
pulling from http://localhost:$HGPORT2/ |
| 70 |
searching for changes |
| 71 |
adding changesets |
| 72 |
adding manifests |
| 73 |
adding file changes |
| 74 |
added 1 changesets with 0 changes to 0 files |
| 75 |
new changesets 66f7d451a68b (1 drafts) |
| 76 |
(run 'hg update' to get a working copy) |
| 77 |
$ hg pull -r 3 |
| 78 |
pulling from http://localhost:$HGPORT2/ |
| 79 |
searching for changes |
| 80 |
adding changesets |
| 81 |
adding manifests |
| 82 |
adding file changes |
| 83 |
added 1 changesets with 0 changes to 0 files (+1 heads) |
| 84 |
new changesets 6100d3090acf (1 drafts) |
| 85 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 86 |
$ cd .. |
| 87 |
$ killdaemons.py |
| 88 |
$ grep 'sending pullbundle ' repo/.hg/blackbox.log |
| 89 |
* sending pullbundle "0.hg" (glob) |
| 90 |
* sending pullbundle "1.hg" (glob) |
| 91 |
* sending pullbundle "3.hg" (glob) |
| 92 |
$ rm repo/.hg/blackbox.log |
| 93 |
|
| 94 |
Test pullbundle functionality for incremental pulls |
| 95 |
|
| 96 |
$ cd repo |
| 97 |
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
| 98 |
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
| 99 |
$ cat ../repo.pid >> $DAEMON_PIDS |
| 100 |
$ cd .. |
| 101 |
$ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 |
| 102 |
requesting all changes |
| 103 |
adding changesets |
| 104 |
adding manifests |
| 105 |
adding file changes |
| 106 |
adding changesets |
| 107 |
adding manifests |
| 108 |
adding file changes |
| 109 |
adding changesets |
| 110 |
adding manifests |
| 111 |
adding file changes |
| 112 |
adding changesets |
| 113 |
adding manifests |
| 114 |
adding file changes |
| 115 |
added 4 changesets with 0 changes to 0 files (+1 heads) |
| 116 |
new changesets 1ea73414a91b:01241442b3c2 (4 drafts) |
| 117 |
updating to branch default |
| 118 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 119 |
$ killdaemons.py |
| 120 |
$ grep 'sending pullbundle ' repo/.hg/blackbox.log |
| 121 |
* sending pullbundle "0.hg" (glob) |
| 122 |
* sending pullbundle "3.hg" (glob) |
| 123 |
* sending pullbundle "1.hg" (glob) |
| 124 |
* sending pullbundle "2.hg" (glob) |
| 125 |
$ rm repo/.hg/blackbox.log |
| 126 |
|
| 127 |
Test pullbundle functionality for incoming |
| 128 |
|
| 129 |
$ cd repo |
| 130 |
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
| 131 |
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
| 132 |
$ cat ../repo.pid >> $DAEMON_PIDS |
| 133 |
$ cd .. |
| 134 |
$ hg clone http://localhost:$HGPORT2/ repo.pullbundle2a -r 0 |
| 135 |
adding changesets |
| 136 |
adding manifests |
| 137 |
adding file changes |
| 138 |
added 1 changesets with 0 changes to 0 files |
| 139 |
new changesets 1ea73414a91b (1 drafts) |
| 140 |
updating to branch default |
| 141 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 142 |
$ cd repo.pullbundle2a |
| 143 |
$ hg incoming -r 66f7d451a68b |
| 144 |
comparing with http://localhost:$HGPORT2/ |
| 145 |
searching for changes |
| 146 |
changeset: 1:66f7d451a68b |
| 147 |
tag: tip |
| 148 |
user: debugbuilddag |
| 149 |
date: Thu Jan 01 00:00:01 1970 +0000 |
| 150 |
summary: r1 |
| 151 |
|
| 152 |
$ cd .. |
| 153 |
$ killdaemons.py |
| 154 |
$ grep 'sending pullbundle ' repo/.hg/blackbox.log |
| 155 |
* sending pullbundle "0.hg" (glob) |
| 156 |
* sending pullbundle "1.hg" (glob) |
| 157 |
$ rm repo/.hg/blackbox.log |
| 158 |
|
| 159 |
Test recovery from misconfigured server sending no new data |
| 160 |
|
| 161 |
$ cd repo |
| 162 |
$ cat <<EOF > .hg/pullbundles.manifest |
| 163 |
> 0.hg heads=66f7d451a68b85ed82ff5fcc254daf50c74144bd bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e |
| 164 |
> 0.hg heads=1ea73414a91b0920940797d8fc6a11e447f8ea1e |
| 165 |
> EOF |
| 166 |
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
| 167 |
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
| 168 |
$ cat ../repo.pid >> $DAEMON_PIDS |
| 169 |
$ cd .. |
| 170 |
$ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 |
| 171 |
adding changesets |
| 172 |
adding manifests |
| 173 |
adding file changes |
| 174 |
added 1 changesets with 0 changes to 0 files |
| 175 |
new changesets 1ea73414a91b (1 drafts) |
| 176 |
updating to branch default |
| 177 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 178 |
$ cd repo.pullbundle3 |
| 179 |
$ hg pull -r 1 |
| 180 |
pulling from http://localhost:$HGPORT2/ |
| 181 |
searching for changes |
| 182 |
adding changesets |
| 183 |
adding manifests |
| 184 |
adding file changes |
| 185 |
abort: 00changelog@66f7d451a68b85ed82ff5fcc254daf50c74144bd: no node |
| 186 |
[50] |
| 187 |
$ cd .. |
| 188 |
$ killdaemons.py |
| 189 |
$ grep 'sending pullbundle ' repo/.hg/blackbox.log |
| 190 |
* sending pullbundle "0.hg" (glob) |
| 191 |
* sending pullbundle "0.hg" (glob) |
| 192 |
$ rm repo/.hg/blackbox.log |
| 193 |
|
| 194 |
Test processing when nodes used in the pullbundles.manifest end up being hidden |
| 195 |
|
| 196 |
$ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a |
| 197 |
1 new obsolescence markers |
| 198 |
$ hg serve --repo repo --config server.view=visible -p $HGPORT -d --pid-file=hg.pid -E errors.log |
| 199 |
$ cat hg.pid >> $DAEMON_PIDS |
| 200 |
$ hg clone http://localhost:$HGPORT repo-obs |
| 201 |
requesting all changes |
| 202 |
adding changesets |
| 203 |
adding manifests |
| 204 |
adding file changes |
| 205 |
adding changesets |
| 206 |
adding manifests |
| 207 |
adding file changes |
| 208 |
added 1 changesets with 0 changes to 0 files |
| 209 |
new changesets 1ea73414a91b (1 drafts) |
| 210 |
updating to branch default |
| 211 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 212 |
$ killdaemons.py |