Mercurial > hg
view tests/test-globalopts @ 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 | 0b9ac7dfcf56 |
children | 46280c004f22 |
line wrap: on
line source
#!/bin/sh hg init a cd a echo a > a hg ci -A -d'1 0' -m a cd .. hg init b cd b echo b > b hg ci -A -d'1 0' -m b cd .. hg clone a c cd c hg pull -f ../b HGMERGE=merge hg merge cd .. echo %% -R/--repository hg -R a tip hg --repository b tip echo %% abbrev of long option hg --repo c tip echo %% --cwd hg --cwd a parents echo %% -y/--noninteractive - just be sure it is parsed hg --cwd a tip -q --noninteractive hg --cwd a tip -q -y echo %% -q/--quiet hg -R a -q tip hg -R b -q tip hg -R c --quiet parents echo %% -v/--verbose hg --cwd c head -v hg --cwd b tip --verbose echo %% --config hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo hg --cwd c --config '' tip -q hg --cwd c --config a.b tip -q hg --cwd c --config a tip -q hg --cwd c --config a.= tip -q hg --cwd c --config .b= tip -q echo %% --debug hg --cwd c log --debug echo %% --traceback hg --cwd c --config x --traceback tip 2>&1 | grep -i 'traceback' echo %% --time hg --cwd a --time tip 2>&1 | grep '^Time:' | sed 's/[0-9][0-9]*/x/g' echo %% --version hg --version -q | sed 's/version [^)]*/version xxx/' echo %% -h/--help hg -h hg --help echo %% not tested: --debugger