[PATCH 1 of 9] branchmap: improve invalid cache message when reading
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Dec 27 17:12:55 UTC 2012
On 27 déc. 2012, at 17:43, Kevin Bullock wrote:
> On Dec 26, 2012, at 2:32 PM, Pierre-Yves David wrote:
>
>> except Exception, inst:
>> if repo.ui.debugflag:
>> - repo.ui.warn(str(inst), '\n')
>> + repo.ui.warn(('invalid branchheads cache: %s\n') % inst)
>
> 1. Choose either this colon, or parentheses around the message on inst, but not both.
I'll drop the parantheses in the exception message, they do not belong here.
> 2. Shouldn't we be using ui.debug() here?
No, we want that written on stderr
> 3. Am I recalling correctly that we don't translate debug messages? If so, the inner parentheses are unnecessary. If not, you're missing an underscore before them.
We do not translate debug message. check code requires those inner parentheses to distinguish that from real error.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list