Mercurial > hg
diff tests/test-mq.t @ 13507:375ba42f3cda stable
mq: gracefully handle malformated status file
This patch prevent mq to crash when .hg/patches/status contains Malformed lines
(without ":"). Blank lines are ignored and other malformed lines issue a
warning.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 11 Feb 2011 13:10:39 +0100 |
parents | 5ccdca7df211 |
children | e0f07847f8de |
line wrap: on
line diff
--- a/tests/test-mq.t Thu Feb 24 00:47:49 2011 +0100 +++ b/tests/test-mq.t Fri Feb 11 13:10:39 2011 +0100 @@ -917,6 +917,25 @@ copy to copy $ cd .. +empty lines in status + + $ hg init emptystatus + $ cd emptystatus + $ hg qinit + $ printf '\n\n' > .hg/patches/status + $ hg qser + $ cd .. + +bad line in status (without ":") + + $ hg init badstatus + $ cd badstatus + $ hg qinit + $ printf 'babar has no colon in this line\n' > .hg/patches/status + $ hg qser + malformated mq status line: ['babar has no colon in this line'] + $ cd .. + test file addition in slow path