[PATCH] config: issue1829: reset "cont" when the current line isnt an item continuation

Martin Geisler mg at lazybytes.net
Sat Sep 19 07:14:41 CDT 2009


Nicolas Dumazet <nicdumz at gmail.com> writes:

> # HG changeset patch
> # User Nicolas Dumazet <nicdumz.commits at gmail.com>
> # Date 1252747027 -7200
> # Node ID b95b73ba740fd1719b71e1b9378c33fb1431e5df
> # Parent  b2f3b9c82ac05283917e274e96f33c59e491f83c
> config: issue1829: reset "cont" when the current line isnt an item continuation

In crew-stable as revision 7f0f882af23d, thanks!

One still gets a stack trace after this patch, but now with a
ConfigError instead of a TypeError.

I've changed dispatch to catch ConfigError too. This duplicates the
catch block for ConfigError in _runcatch (but uses sys.stderr.write
instead of ui.warn). I think both are necessary since extensions might
load configuration files too.

However, if dispatch and _runcatch were combined into one function, then
we could have just one try block around the construction of ui and the
execution of the command. Is this not done in order to user ui to report
the errors?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090919/1c404f5a/attachment.pgp 


More information about the Mercurial-devel mailing list