Sorry for being a bit slow at looking at this - the patch looks nice
and the current behaviour should definitely be improved.
If I read the new logic correctly, if you have a single author in the
global prefs file, it'll be overwritten if 'alwaysAsk' is true and you
choose "Other". But if you have multiple authors the global prefs file
will never be changed whatever 'alwaysAsk' is set to.
Is that intentional? It feels a bit confusing, but I'm not sure I have
a better alternative. One option might be to always append a new author
no matter how many are there already.
Minor comments about the patch: if you name it "resolve issue2512: ..."
then it will automatically close the bug in the bugtracker when accepted.
It could also rename your failing test case to a passing test case.
My reasoning is that users use darcs in one of two ways:
(1) Use the same author name for all repositories. In this case, we
always store the user name in the global settings.
(2) Use different user names across repositories. This is indicated by
adding multiple authors in the global settings. In this case, we want to
store the author locally, and leave the global settings as is, so we get
the author selection prompt again when we create another repository.
If the user chooses "Other" in case 2, it probably makes sense to both
store it locally, but also add it to the global settings. Thus, the
global settings would collect all used author names over time.
- prefixed patch name with "resolve issue2512:"
- removes "failing-" prefix of test from Patch1519
(as a result, this patch now depends on Patch1519)
- in the case that there is only one author and alwaysAsk is True, the
author is written to the repository instead of global settings
(this hopefully better reflects what users expect)