On Tuesday 24 March 2009, Eric Kow wrote: > Hi Kevin, > > Haven't heard from you in a while. Note that we've merged the lists, > so any discussion to darcs-devel actually belongs in darcs-users now. > > I'm inclined to agree with Kevin about leaving the actual behaviour as > is. I wouldn't mind a help text that more strongly encouraged the use > of ~/.darcs/author or DARCS_EMAIL. > > In general, I tend to be nervous about setting global things > automatically, because I suspect that what tends to happen is that > users don't notice it and the system becomes a lot more magical and > less transparent. Not sure if I'm making a lot of sense, though.
I agree. As Kevin pointed out, one person may use different identities when working on different projects (I know I do), so setting a global ~/.darcs/author file doesn't work as I can inadvertently use the wrong identity when creating a new project and only notice later when I already recorded a couple of patches. The only way when ~/.darcs/author is useful is when I use only one (or mostly one) identity. But if I use more than one (but mostly one) and set it globally, it's probably the most dangerous case as it's easier to forget about the global default, especially if I seldomly overwrite it. Even though I may be tempted to set the global identity to avoid to input it everytime I set up a new repository, then danger of forgetting about it and using the wrong one next time prevents me from this. I think that a better approach would be to always ask for the email, even when ~/.darcs/author or DARCS_EMAIL are set. In other words when I create a new repository, I still get the question, but this time it fills in the value from DARCS_EMAIL or ~/.darcs/author (in this order) if they exist. Kind of like a default value to use if I do not input anything. If I'm OK with that identity I can simply press enter, in which case nothing happens (i.e. it won't write _darcs/prefs/author with the answer as the identity is already set globally). However if I alter it and use a different one, then it should write it to _darcs/prefs/author This way I can set a global default so I don't have to type it every time, but at the same time I cannot forget about it and mistakenly use the wrong identity without noticing because I'm always reminded when I create a new repository. However, pressing an <Enter> most of the time is less annoying than typing the email every time. > > On Tue, Mar 24, 2009 at 11:20:02 -0600, [email protected] wrote: > > Quoting Max Battcher <[email protected]>: > > > On Mon, Mar 23, 2009 at 7:50 PM, Trent Buck <[email protected]> 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 -- Dan _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
