Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
13506:117990768fe0 | 13507:375ba42f3cda |
---|---|
913 > EOF | 913 > EOF |
914 $ hg qdiff --git | 914 $ hg qdiff --git |
915 diff --git a/new b/copy | 915 diff --git a/new b/copy |
916 copy from new | 916 copy from new |
917 copy to copy | 917 copy to copy |
918 $ cd .. | |
919 | |
920 empty lines in status | |
921 | |
922 $ hg init emptystatus | |
923 $ cd emptystatus | |
924 $ hg qinit | |
925 $ printf '\n\n' > .hg/patches/status | |
926 $ hg qser | |
927 $ cd .. | |
928 | |
929 bad line in status (without ":") | |
930 | |
931 $ hg init badstatus | |
932 $ cd badstatus | |
933 $ hg qinit | |
934 $ printf 'babar has no colon in this line\n' > .hg/patches/status | |
935 $ hg qser | |
936 malformated mq status line: ['babar has no colon in this line'] | |
918 $ cd .. | 937 $ cd .. |
919 | 938 |
920 | 939 |
921 test file addition in slow path | 940 test file addition in slow path |
922 | 941 |