Show More
@@ -834,12 +834,21 b' class unbundle20(unpackermixin):' | |||||
834 | if paramssize < 0: |
|
834 | if paramssize < 0: | |
835 | raise error.BundleValueError('negative bundle param size: %i' |
|
835 | raise error.BundleValueError('negative bundle param size: %i' | |
836 | % paramssize) |
|
836 | % paramssize) | |
837 | yield _pack(_fstreamparamsize, paramssize) |
|
|||
838 | if paramssize: |
|
837 | if paramssize: | |
839 | params = self._readexact(paramssize) |
|
838 | params = self._readexact(paramssize) | |
840 | self._processallparams(params) |
|
839 | self._processallparams(params) | |
841 | yield params |
|
840 | # The payload itself is decompressed below, so drop | |
842 | assert self._compengine.bundletype()[1] == 'UN' |
|
841 | # the compression parameter passed down to compensate. | |
|
842 | outparams = [] | |||
|
843 | for p in params.split(' '): | |||
|
844 | k, v = p.split('=', 1) | |||
|
845 | if k.lower() != 'compression': | |||
|
846 | outparams.append(p) | |||
|
847 | outparams = ' '.join(outparams) | |||
|
848 | yield _pack(_fstreamparamsize, len(outparams)) | |||
|
849 | yield outparams | |||
|
850 | else: | |||
|
851 | yield _pack(_fstreamparamsize, paramssize) | |||
843 | # From there, payload might need to be decompressed |
|
852 | # From there, payload might need to be decompressed | |
844 | self._fp = self._compengine.decompressorreader(self._fp) |
|
853 | self._fp = self._compengine.decompressorreader(self._fp) | |
845 | emptycount = 0 |
|
854 | emptycount = 0 |
@@ -120,6 +120,38 b' Test pullbundle functionality for increm' | |||||
120 | * sending pullbundle "1.hg" (glob) |
|
120 | * sending pullbundle "1.hg" (glob) | |
121 | $ rm repo/.hg/blackbox.log |
|
121 | $ rm repo/.hg/blackbox.log | |
122 |
|
122 | |||
|
123 | Test pullbundle functionality for incoming | |||
|
124 | ||||
|
125 | $ cd repo | |||
|
126 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |||
|
127 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |||
|
128 | $ cat ../repo.pid >> $DAEMON_PIDS | |||
|
129 | $ cd .. | |||
|
130 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2a -r 0 | |||
|
131 | adding changesets | |||
|
132 | adding manifests | |||
|
133 | adding file changes | |||
|
134 | added 1 changesets with 1 changes to 1 files | |||
|
135 | new changesets bbd179dfa0a7 (1 drafts) | |||
|
136 | updating to branch default | |||
|
137 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
138 | $ cd repo.pullbundle2a | |||
|
139 | $ hg incoming -r ed1b79f46b9a | |||
|
140 | comparing with http://localhost:$HGPORT2/ | |||
|
141 | searching for changes | |||
|
142 | changeset: 1:ed1b79f46b9a | |||
|
143 | tag: tip | |||
|
144 | user: test | |||
|
145 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
146 | summary: change foo | |||
|
147 | ||||
|
148 | $ cd .. | |||
|
149 | $ killdaemons.py | |||
|
150 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |||
|
151 | * sending pullbundle "0.hg" (glob) | |||
|
152 | * sending pullbundle "1.hg" (glob) | |||
|
153 | $ rm repo/.hg/blackbox.log | |||
|
154 | ||||
123 | Test recovery from misconfigured server sending no new data |
|
155 | Test recovery from misconfigured server sending no new data | |
124 |
|
156 | |||
125 | $ cd repo |
|
157 | $ cd repo |
General Comments 0
You need to be logged in to leave comments.
Login now