comparison tests/test-flagprocessor.t @ 31833:723c1ab2f77e

test-flagprocessor: add tests about bundlerepo This shows flag processor is broken with a bundle repo. The test creates non-liner history to exercise code path where the deltaparent cannot be reused.
author Jun Wu <quark@fb.com>
date Thu, 06 Apr 2017 17:24:36 -0700
parents c1b7b2285522
children 433ab46f6bb4
comparison
equal deleted inserted replaced
31832:77f746e5383a 31833:723c1ab2f77e
161 > EOF 161 > EOF
162 $ echo 'this should fail' > file 162 $ echo 'this should fail' > file
163 $ hg commit -Aqm 'add file' 163 $ hg commit -Aqm 'add file'
164 abort: cannot register multiple processors on flag '0x8'. 164 abort: cannot register multiple processors on flag '0x8'.
165 [255] 165 [255]
166
167 $ cd ..
168
169 # TEST: bundle repo
170 $ hg init bundletest
171 $ cd bundletest
172
173 $ cat >> .hg/hgrc << EOF
174 > [extensions]
175 > flagprocessor=$TESTDIR/flagprocessorext.py
176 > EOF
177
178 $ for i in 0 single two three 4; do
179 > echo '[BASE64]a-bit-longer-'$i > base64
180 > hg commit -m base64-$i -A base64
181 > done
182
183 $ hg update 2 -q
184 $ echo '[BASE64]a-bit-longer-branching' > base64
185 $ hg commit -q -m branching
186
187 $ hg bundle --base 1 bundle.hg
188 4 changesets found
189 $ hg --config extensions.strip= strip -r 2 --no-backup --force -q
190 $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )'
191 Traceback (most recent call last):
192 mercurial.mpatch.mpatchError: invalid patch
193
194 $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*| )'
195 Traceback (most recent call last):
196 TypeError: Incorrect padding
197 $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )'
198 abort: repository bundle-again.hg not found!