Mercurial > hg
view tests/test-walk @ 4358:11dc22eb8e8d
Fix segfaults when parsing bdiff hunks in mpatch.decode() and .patchedsize()
- fix off by 11 when checking if there are more hunks (found by Maris Fogels)
- bail out if start is greater than end
- check if new hunk starts after start/end/len block of current hunk as
the pointer can wrap around on very large values, reproducible with
import mpatch; mpatch.patchedsize(12, 'x'*12)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 27 Jan 2007 23:07:06 +0100 |
parents | c93562fb12cc |
children | 0d51eb296fb9 |
line wrap: on
line source
#!/bin/sh mkdir t cd t hg init mkdir -p beans for b in kidney navy turtle borlotti black pinto; do echo $b > beans/$b done mkdir -p mammals/Procyonidae for m in cacomistle coatimundi raccoon; do echo $m > mammals/Procyonidae/$m done echo skunk > mammals/skunk echo fennel > fennel echo fenugreek > fenugreek echo fiddlehead > fiddlehead echo glob:glob > glob:glob hg addremove hg commit -m "commit #0" -d "1000000 0" hg debugwalk cd mammals hg debugwalk . hg debugwalk Procyonidae cd Procyonidae hg debugwalk . hg debugwalk .. cd .. hg debugwalk ../beans hg debugwalk . hg debugwalk .hg hg debugwalk ../.hg cd .. hg debugwalk -Ibeans hg debugwalk 'glob:mammals/../beans/b*' hg debugwalk '-X*/Procyonidae' mammals hg debugwalk path:mammals hg debugwalk .. hg debugwalk beans/../.. hg debugwalk .hg hg debugwalk beans/../.hg hg debugwalk beans/../.hg/data hg debugwalk beans/.hg # Don't know how to test absolute paths without always getting a false # error. #hg debugwalk `pwd`/beans #hg debugwalk `pwd`/.. hg debugwalk glob:\* hg debugwalk 're:.*[kb]$' hg debugwalk path:beans/black hg debugwalk beans 'glob:beans/*' hg debugwalk 'glob:j*' hg debugwalk NOEXIST mkfifo fifo hg debugwalk fifo rm fenugreek hg debugwalk fenugreek hg rm fenugreek hg debugwalk fenugreek touch new hg debugwalk new cd .. hg -R t debugwalk t/mammals/skunk mkdir t2 cd t2 hg -R ../t debugwalk ../t/mammals/skunk hg --cwd ../t debugwalk mammals/skunk