darcs

Issue 1405 Suggestion: remind user of DARCS_EMAIL

Title Suggestion: remind user of DARCS_EMAIL
Priority wishlist Status resolved
Milestone Resolved in
Superseder Nosy List WorldMaker, darcs-devel, dmitry.kurochkin, kowey, quick, thorkilnaur, twb
Assigned To
Topics

Created on 2009-03-23.23:50:12 by twb, last changed 2009-10-23.23:59:55 by admin.

Messages
msg7503 (view) Author: twb Date: 2009-03-23.23:50:09
Ashley Moran <ashley.moran@patchspace.co.uk> writes:

> This bugged me for ages until I googled for it and found there was an
> answer.  Every time you record the first patch in a repo, it asks you
> for your email address:
>
> % darcs record
> Darcs needs to know what name (conventionally an email address) to use
> as the patch author, e.g. 'Fred Bloggs <fred@bloggs.invalid>'.  If you
> provide one now it will be stored in the file '_darcs/prefs/author'
> and used as a default in the future.  To change your preferred author
> address, simply delete or edit this file.

I strongly feel that this prompt should write ~/.darcs/author, *not*
_darcs/prefs/author.  I think it is far more likely that two users will
share a repo (in which case _darcs is wrong) than that two users will
share a $HOME.

> I think it would be useful to point out you can set the DARCS_EMAIL
> environment variable in this explanation.  It'd be a very easy way of
> improving the usability of making many branches to new users.  And
> people like me that didn't realise there was a solution!

We could certainly increase the visibility of $EMAIL and $DARCS_EMAIL as
well.
msg7504 (view) Author: WorldMaker Date: 2009-03-24.04:55:33
On Mon, Mar 23, 2009 at 7:50 PM, Trent Buck <bugs@darcs.net> wrote:
> I strongly feel that this prompt should write ~/.darcs/author, *not*
> _darcs/prefs/author.  I think it is far more likely that two users will
> share a repo (in which case _darcs is wrong) than that two users will
> share a $HOME.

+1.
msg7505 (view) Author: quick Date: 2009-03-24.17:27:23
Quoting Max Battcher <me@worldmaker.net>:

> On Mon, Mar 23, 2009 at 7:50 PM, Trent Buck <bugs@darcs.net> wrote:
> > I strongly feel that this prompt should write ~/.darcs/author, *not*
> > _darcs/prefs/author.  I think it is far more likely that two users will
> > share a repo (in which case _darcs is wrong) than that two users will
> > share a $HOME.
> 
> +1.

-1 for me.

I disagree that two users will share a repo: each user should have their own 
clone of the repo and work there, otherwise they have conflicts editing the 
same files, running simultaneous builds, and all sorts of other non-
deterministic behavior.  Darcs is a distributed SCM after all...

The second reason is that the user may want different author ids for different 
repos.  For example, I use darcs at work and darcs for personal stuff: I use a 
different author for both of these.

I think it's good to use:
  1. _darcs/prefs/author
  2. DARCS_EMAIL
  3. ~/.darcs/author
  4. EMAIL

in that order, but if none of the above are set, the darcs prompt should set 
_darcs/prefs/author.

-KQ

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
msg7506 (view) Author: twb Date: 2009-03-24.22:29:48
On Tue, Mar 24, 2009 at 05:27:27PM -0000, Kevin Quick wrote:
> 
> Kevin Quick <quick@sparq.org> added the comment:
> 
> Quoting Max Battcher <me@worldmaker.net>:
> 
> > On Mon, Mar 23, 2009 at 7:50 PM, Trent Buck <bugs@darcs.net> wrote:
> > > I strongly feel that this prompt should write ~/.darcs/author, *not*
> > > _darcs/prefs/author.  I think it is far more likely that two users will
> > > share a repo (in which case _darcs is wrong) than that two users will
> > > share a $HOME.
> > 
> > +1.
> 
> -1 for me.
> 
> I disagree that two users will share a repo: each user should have their own 
> clone of the repo and work there, otherwise they have conflicts editing the 
> same files, running simultaneous builds, and all sorts of other non-
> deterministic behavior.  Darcs is a distributed SCM after all...

But someone who has never used Darcs before, and thus has never set
$DARCS_EMAIL, $EMAIL, _darcs/prefs/author nor ~/.darcs/author, will
not know that.

> The second reason is that the user may want different author ids for different 
> repos.  For example, I use darcs at work and darcs for personal stuff: I use a 
> different author for both of these.

The proposed change will not prevent this.  It merely means that you,
the knowledgable darcs user, will need to use that knowledge to do

    echo $OTHEREMAIL >_darcs/prefs/author

instead of requiring a *new* user, who doesn't know what they're doing, to do

    echo $EMAIL >~/.darcs/author

> I think it's good to use:
>   1. _darcs/prefs/author
>   2. DARCS_EMAIL
>   3. ~/.darcs/author
>   4. EMAIL
> 
> in that order, but if none of the above are set, the darcs prompt should set 
> _darcs/prefs/author.

It's this last point we're discussing, and I guess we disagree on that.
msg7507 (view) Author: quick Date: 2009-03-25.00:22:27
Quoting Trent Buck <bugs@darcs.net>:

> Trent Buck <trentbuck@gmail.com> added the comment:
> On Tue, Mar 24, 2009 at 05:27:27PM -0000, Kevin Quick wrote:
> > Kevin Quick <quick@sparq.org> added the comment:
> > Quoting Max Battcher <me@worldmaker.net>:
> > > On Mon, Mar 23, 2009 at 7:50 PM, Trent Buck <bugs@darcs.net> wrote:
> > > > I strongly feel that this prompt should write ~/.darcs/author, *not*
> > > > _darcs/prefs/author.  I think it is far more likely that two users
> will
> > > > share a repo (in which case _darcs is wrong) than that two users will
> > > > share a $HOME.

> > 
> > I disagree that two users will share a repo: each user should have their
> own 
> > clone of the repo and work there, otherwise they have conflicts editing the
> 
> > same files, running simultaneous builds, and all sorts of other non-
> > deterministic behavior.  Darcs is a distributed SCM after all...
> 
> But someone who has never used Darcs before, and thus has never set
> $DARCS_EMAIL, $EMAIL, _darcs/prefs/author nor ~/.darcs/author, will
> not know that.

But they probably wouldn't have that usage methodology... even with something 
as archaic as CVS.  I'd assert that Everyone uses their own development tree 
and synchronizes against common repositories, regardless of VCS.  Multiple 
people working simultaneously in the same dev directory tree is all sorts of 
pain.

> > The second reason is that the user may want different author ids for
> different 
> > repos.  For example, I use darcs at work and darcs for personal stuff: I
> use a 
> > different author for both of these.
> 
> The proposed change will not prevent this.  It merely means that you,
> the knowledgable darcs user, will need to use that knowledge to do
> 
>     echo $OTHEREMAIL >_darcs/prefs/author
> 
> instead of requiring a *new* user, who doesn't know what they're doing, to
> do
> 
>     echo $EMAIL >~/.darcs/author

But the proposed change would make this "experts-only" functionality, whereas 
the current model seems to DTRT already for all but the tormented folks trying 
to sharing dev directory trees.  While my position is admittedly biased, I feel 
like your proposal would violate the principle of least surprise.

Your point about the new user isn't valid since darcs already handles that by 
asking you what identity to use and storing that for you automatically.

Instead, if we enhance the documentation to describe DARCS_EMAIL, then anyone 
trying to work in your situation would just do the following:

$ cat >> .bashrc
export DARCS_EMAIL me@here
^D
$

-KQ

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
msg7509 (view) Author: twb Date: 2009-03-25.01:17:56
On Tue, Mar 24, 2009 at 06:21:46PM -0600, quick@sparq.org wrote:
>>> I disagree that two users will share a repo [...]
>>
>> But someone who has never used Darcs before, and thus has never
>> set $DARCS_EMAIL, $EMAIL, _darcs/prefs/author nor ~/.darcs/author,
>> will not know that.
>
> But they probably wouldn't have that usage methodology... even with
> something as archaic as CVS.  I'd assert that Everyone uses their
> own development tree and synchronizes against common repositories,
> regardless of VCS.

Another correspondent has already pointed out that this is not true
for his organization, so that assertion is false.

As for historical usage, RCS certainly "everyone shares a working
tree" as the default usage.

> But the proposed change would make this "experts-only" functionality, whereas
> the current model seems to DTRT already for all but the tormented folks trying
> to sharing dev directory trees.

A second problem with the current behaviour is that a naïve user will
be asked about their identity for every new repo, instead of just
once.  Furthermore, if they mistype their identity in one repo, they
will end up with an (unnecessary) mismatch between the two.

> Your point about the new user isn't valid since darcs already handles that by
> asking you what identity to use and storing that for you automatically.

The *only* thing we're discussing is *where* darcs should
automatically store the identity it asks you for.

> Instead, if we enhance the documentation to describe DARCS_EMAIL,
> then anyone trying to work in your situation would just do the
> following:
>
> $ cat>> .bashrc
> export DARCS_EMAIL me@here
> ^D
> $

As long as users read the documentation.  Stupid new users don't,
therefore the default "I didn't read the documentation" behaviour
should be optimized for them.
msg7512 (view) Author: twb Date: 2009-03-26.08:58:53
The following patch updated the status of issue1405 to be resolved:

* Resolve issue1405: improve discoverability of global author file. 
Ignore-this: 5f53bfc8020f6bf34e33362effcf4a10
History
Date User Action Args
2009-03-23 23:50:12twbcreate
2009-03-24 04:55:36maxbattchersetstatus: unread -> unknown
nosy: + darcs-devel, maxbattcher
messages: + msg7504
2009-03-24 17:27:27quicksetnosy: + quick
messages: + msg7505
2009-03-24 22:29:52twbsetnosy: kowey, darcs-devel, maxbattcher, simon, twb, quick, thorkilnaur, dmitry.kurochkin
messages: + msg7506
2009-03-25 00:22:32quicksetnosy: kowey, darcs-devel, maxbattcher, simon, twb, quick, thorkilnaur, dmitry.kurochkin
messages: + msg7507
2009-03-25 01:17:58twbsetnosy: kowey, darcs-devel, maxbattcher, simon, twb, quick, thorkilnaur, dmitry.kurochkin
messages: + msg7509
2009-03-26 08:58:57twbsetstatus: unknown -> resolved
nosy: kowey, darcs-devel, maxbattcher, simon, twb, quick, thorkilnaur, dmitry.kurochkin
messages: + msg7512
2009-04-22 02:59:52twbsetpriority: wishlist
nosy: kowey, darcs-devel, maxbattcher, simon, twb, quick, thorkilnaur, dmitry.kurochkin
2009-08-25 17:42:34adminsetnosy: - simon
2009-08-27 14:17:42adminsetnosy: kowey, darcs-devel, maxbattcher, twb, quick, thorkilnaur, dmitry.kurochkin
2009-10-23 23:59:55adminsetnosy: + WorldMaker, - maxbattcher