[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Make conflict message translatable

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 2 Apr 2013 14:51:45 +0100 (BST)

Mattias Engdegård wrote:
> 29 mar 2013 kl. 03.03 skrev Julian Foad:
>> Mattias Engdegård wrote:
>>> The patch assumes that svn_node_none, svn_node_unknown or
>>> svn_wc_operation_none cannot occur here. Please confirm or refute.
>>
>> I haven't checked whether these can occur in this message.  svn_node_unknown
>> can certainly occur for the local kind of node -- such as in a tree conflict
>> when a merge tries to edit a path which doesn't exist in the local working
>> copy.  I *think* the node kind that appears in these messages can be 'none'
>> for this reason  I can check this and fix if necessary and commit it,
>> probably on Monday if nobody does it sooner.
>
> Please do - I haven't been able to produce such a situation myself, but
> I'm unsure of the invariants in effect at this point.

A quick update.  I tried your patch and the test suite fails here:

FAIL:  upgrade_tests.py 24: wc with add-add and del-del tree conflicts

That's failing in local_reason_str() with kind=none and reason=deleted, so at least we need that function to handle that case.

This indicates that perhaps the only way to get kind=none is an upgrade from a previous WC format.  We could handle such unusual cases by constructing a response from the separate parts, and not attempt to use different messages for every possible combination.  The important thing is to use well written messages for the common cases.  The unusual or impossible cases can just have some inelegant construction like we were doing before, and then we'd be sure to handle any case that might arise rather than throwing an error.

Does that sound good and, if so, would you like to change the patch to do that?

- Julian

>>  My only other suggestion would be to include the comma in the English
>> strings instead of in the format string -- _("local file edit,")
>> instead of _("local file edit") -- so that the other translations can
>> use different (or no) punctuation.
>
> To me it seemed unlikely that the punctuation would vary between different
> cases, but I could be wrong about that. Changing it in the way you propose
> wouldn't do any harm, so please do that if you like.
>
> Thanks for looking at the patch!
Received on 2013-04-02 15:52:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.