darcs

Patch 308 fancy interactive author selection

Title fancy interactive author selection
Superseder Nosy List kowey, mornfall, quick
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-07-18.11:37:30 by kowey, last changed 2011-05-10.20:35:50 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
tidy-darcs_utils-exports_.dpatch kowey, 2010-07-18.11:37:30 text/x-darcs-patch
unnamed kowey, 2010-07-18.11:37:30
See mailing list archives for discussion on individual patches.
Messages
msg11788 (view) Author: kowey Date: 2010-07-18.11:37:30
4 patches for repository http://darcs.net:

The last patch needs a rather Grumpy Old Man.  I tend to use DARCS_AUTHOR to
save my UoB address for Darcs repositories.  Everytime I work on the
Darcs project, I make a branch and accidentally record a patch with my UoB
identity (I then have to edit my repo pref and amend ususually a series of
patches because I don't notice until darcs send time)

That said, every feature has a long-term cost, and introduces a long term
legacy.  So we need to challenge new features.  If we don't reject them,
we need to think about how things fit together in the long term...

Sun Jul 18 11:19:00 BST 2010  Eric Kow <kowey@darcs.net>
  * Tidy Darcs.Utils exports.

Sun Jul 18 11:26:21 BST 2010  Eric Kow <kowey@darcs.net>
  * Cut functions Darcs.Utils.putStrLnError and putDocLnError.

Sun Jul 18 12:26:10 BST 2010  Eric Kow <kowey@darcs.net>
  * Helper Darcs.Utils.askUserListItem to select from an arbitrary list.

Sun Jul 18 12:33:53 BST 2010  Eric Kow <kowey@darcs.net>
  * Resolve issue1530: allow user to pick from multiple email address.
  If your global authors pref has more than one line in it, Darcs will
  prompt you something like:
  
    You have saved the following email addresses to your global settings:
    1. Fred Bloggs <fred@example.net>
    2. Fred Bloggs <fred@home.example.tld>
    3. BLOGGS Fred <fbloggs@example.com>
    4. Other
    Please select an email address for this repository.
Attachments
msg11795 (view) Author: kowey Date: 2010-07-18.15:46:44
Sigh, this causes a regression in the darcs tag behaviour
msg11799 (view) Author: kowey Date: 2010-07-18.20:30:40
False alarm!  It was just that I did not have a _darcs/prefs/author
defined in the repo in question.  Please review/grumpy-old-man away
msg11800 (view) Author: quick Date: 2010-07-19.04:45:02
On Sun, 18 Jul 2010 04:37:30 -0700, Eric Kow <bugs@darcs.net> wrote:

> The last patch needs a rather Grumpy Old Man.  I tend to use DARCS_AUTHOR to...

You won't get it from me: I like this change and it'll help me as well.  Thanks, Eric!

-- 
-KQ
msg12003 (view) Author: mornfall Date: 2010-08-06.14:27:14
I have pushed first two (cleanup) patches. I am not opposed to the 
feature either, although I am not sure my grumpiness is enough today.
msg12038 (view) Author: darcswatch Date: 2010-08-07.19:02:15
This patch bundle (with 4 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-af81d8c344543f66f303a0c474635da911d05294
msg12062 (view) Author: kowey Date: 2010-08-08.15:52:48
On Fri, Aug 06, 2010 at 14:27:14 +0000, Petr Ročkai wrote:
> I have pushed first two (cleanup) patches. I am not opposed to the 
> feature either, although I am not sure my grumpiness is enough today.

Petr assures me he's run through the proposed Grumpy Old Man gamut,
but I thought it was important we make this sort of thing explicit
:-)

So here I go, with a little autogrumpiness

1. What problem does the proposed feature solve?

   Conveniently specifying your name and email address when you use
   multiple identities in real life.

2. What are the user stories?

   Eric has repositories for his University work, darcs hacking and
   other hacking.  He'd like his patches to be attributed to
   Eric Kow <E.Y.Kow@brighton.ac.uk>,
   Eric Kow <kowey@darcs.net>, and
   Eric Kow <eric.kow@gmail.com> respectively.

   To do this, he puts all three addresses into ${HOME}/.darcs/authors
   one per line.  The next time Darcs encounters a repository without
   an author, it gives him a multiple choice menu, or the option to
   enter a new address by hand.

3. Does this change any pre-existing workflows?
   Does this introduce any incompatibilities?

   One thing this changes is that folks with multiple email addresses
   may rely more on the global preferences system, rather than using
   darcs environment variables.  It could be useful to think about
   what role the environment variables really play in configuring darcs.
   Maybe we could do away with those that merely set preferences.

   There are no incompatibilities that I can tell.  Old darcsen should
   just ignore any authors past the first non-empty line, which seems
   no worse than before.

4. How do we preserve the conceptual integrity of Darcs? Is the UI for this
   feature really Darcs-ish?

   The UI is not entirely Darcs-ish in that it introduces two new concepts:
   * that each line in a certain kind of configuration file represents
     an alternative option
   * multiple choice UI where you plug in a number (eg "3" to indicate
     your choice)

   But we don't seem to have an alternative.  Hopefully the new UI concepts
   we introduce can be recycled for some other tasks, for example having
   multiple default repos and being able to choose among them or something.

5. What are the possible unintended interactions with other pre-existing features?

   Should be none.  Only the author lookup uses the ~/.darcs/author file

6. What are the alternative approaches to solving the same problem? Why do we prefer this one?

   One alternative might be never to specify a default, and just live with typing
   it in (or copy and pasting it) each time.  But in the case of branching your
   work and recording patches, this sort of delay can upset your train of thought.
  
   Another would be to just grin and bear it, remembering to change your
   _darcs/authors for each repository, but then you'll tend to have recorded
   a lot of patches under the wrong identity, only to think of it when it's too
   late.

7. Who are the stakeholders? Who is going to benefit/be affected by this
   feature: end-users, repo farms like patch-tag, darcs developers?

   This is all about end users, particularly the sort of crazy user who would
   actually care about which of their email addresses is being used in what
   context.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
msg14273 (view) Author: darcswatch Date: 2011-05-10.20:35:50
This patch bundle (with 4 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-af81d8c344543f66f303a0c474635da911d05294
History
Date User Action Args
2010-07-18 11:37:30koweycreate
2010-07-18 11:38:47darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-af81d8c344543f66f303a0c474635da911d05294
2010-07-18 11:39:17koweysettitle: Tidy Darcs.Utils exports. (and 3 more) -> fancy interactive author selection
2010-07-18 15:46:44koweysetstatus: needs-review -> followup-requested
assignedto: kowey
messages: + msg11795
2010-07-18 20:30:40koweysetstatus: followup-requested -> review-in-progress
assignedto: kowey ->
messages: + msg11799
2010-07-18 20:31:30koweysetstatus: review-in-progress -> needs-review
2010-07-19 04:45:02quicksetnosy: + quick
messages: + msg11800
title: fancy interactive author selection -> Tidy Darcs.Utils exports. (and 3 more)
2010-07-22 10:47:48koweysettitle: Tidy Darcs.Utils exports. (and 3 more) -> fancy interactive author selection
2010-08-06 14:27:14mornfallsetnosy: + mornfall
messages: + msg12003
2010-08-07 19:02:15darcswatchsetstatus: needs-review -> accepted
messages: + msg12038
2010-08-08 15:52:48koweysetmessages: + msg12062
2011-05-10 20:35:50darcswatchsetmessages: + msg14273