darcs

Issue 556 wishlist: default repository for darcs pull and push

Title wishlist: default repository for darcs pull and push
Priority wishlist Status wont-fix
Milestone Resolved in
Superseder Nosy List alex1, darcs-devel, dmitry.kurochkin, ertai, jch, kowey, panu.kalliokoski, thorkilnaur, tommy
Assigned To
Topics

Created on 2007-10-30.18:59:26 by panu.kalliokoski, last changed 2009-10-24.00:04:36 by admin.

Messages
msg2206 (view) Author: panu.kalliokoski Date: 2007-10-30.18:59:25
Currently, giving a new repository for darcs put, pull or push changes
the default repository for darcs pull and push commands.  However,
usually I mostly want to deal with a primary repository ("upstream" /
"central") with pull and push, and only randomly make pull and push
operations from elsewhere.

The interface has sometimes caused irritated situations where I've
pulled in a set of patches from a distant branch or totally unrelated
project, and accidentally then pushed (a bit later) a lot of changes
there by accident.  This is by far the most common way I tend to screw
up with darcs.

Would it be possible to only set the default repository during an
initial get / put, and leave it at that indefinitely?  This would have
been the correct way of operation in all of my situations thus far.

Panu
msg2208 (view) Author: kowey Date: 2007-10-30.19:10:54
Hi,

On Tue, Oct 30, 2007 at 18:59:26 -0000, Panu A Kalliokoski wrote:
> Would it be possible to only set the default repository during an
> initial get / put, and leave it at that indefinitely?  This would have
> been the correct way of operation in all of my situations thus far.

Have a look at the --no-set-defaults switch and the
_darcs/defaults/prefs mechanism

Best,
msg2209 (view) Author: droundy Date: 2007-10-30.19:26:05
On Tue, Oct 30, 2007 at 07:10:54PM -0000, Eric Kow wrote:
> On Tue, Oct 30, 2007 at 18:59:26 -0000, Panu A Kalliokoski wrote:
> > Would it be possible to only set the default repository during an
> > initial get / put, and leave it at that indefinitely?  This would have
> > been the correct way of operation in all of my situations thus far.
> 
> Have a look at the --no-set-defaults switch and the
> _darcs/defaults/prefs mechanism

Correction:  _darcs/prefs/defaults

(which Eric knows, but a typo here could definitely confuse the user)
-- 
David Roundy
Department of Physics
Oregon State University
msg2210 (view) Author: panu.kalliokoski Date: 2007-10-30.19:33:45
On Tue, Oct 30, 2007 at 07:10:54PM -0000, Eric Kow wrote:
> Have a look at the --no-set-defaults switch and the
> _darcs/defaults/prefs mechanism

Ok, I was unaware of this switch.  I wonder if other people have made
mistakes of the same kind, and whether it would be desirable to change
push and pull to use --no-set-default by default.

Panu
msg2212 (view) Author: alex1 Date: 2007-10-30.20:14:04
[snip]
> Would it be possible to only set the default repository during an
> initial get / put, and leave it at that indefinitely?  This would have
> been the correct way of operation in all of my situations thus far.

You can accomplish this pretty much by adding these two lines to your
~/.darcs/defaults:

  pull no-set-default
  push no-set-default

That said, I agree wholeheartedly that the current behaviour is the
inverted and contrary to the way I, and every developer I know, use a
version control system.

We typically work with a single upstream, occasionally cherry-picking
from other branches or shuttling patches off to special release
branches, but generally "push" and "pull" *need* to remain consistent.

This is not the only bad default in Darcs; --set-scripts-executable
and --look-for-adds both enable behaviour that other version control
systems consider dead obvious.

These are also a points of confusion which I have noticed will trip up
new users. Helping these people set up a sane config file works, and I
do that a lot, but the default settings ought to be sane from the get
go.

Alexander.
msg2215 (view) Author: ertai Date: 2007-10-30.20:49:15
Excerpts from Alexander Staubo's message of Tue Oct 30 21:13:35 +0100 2007:
> On 10/30/07, Panu A Kalliokoski <bugs@darcs.net> wrote:
> > Currently, giving a new repository for darcs put, pull or push changes
> > the default repository for darcs pull and push commands.  However,
> > usually I mostly want to deal with a primary repository ("upstream" /
> > "central") with pull and push, and only randomly make pull and push
> > operations from elsewhere.
> [snip]
> > Would it be possible to only set the default repository during an
> > initial get / put, and leave it at that indefinitely?  This would have
> > been the correct way of operation in all of my situations thus far.
> 
> You can accomplish this pretty much by adding these two lines to your
> ~/.darcs/defaults:
> 
>   pull no-set-default
>   push no-set-default
> 
> That said, I agree wholeheartedly that the current behaviour is the
> inverted and contrary to the way I, and every developer I know, use a
> version control system.
> 
> We typically work with a single upstream, occasionally cherry-picking
> from other branches or shuttling patches off to special release
> branches, but generally "push" and "pull" *need* to remain consistent.
> 
> This is not the only bad default in Darcs; --set-scripts-executable
> and --look-for-adds both enable behaviour that other version control
> systems consider dead obvious.
> 
> These are also a points of confusion which I have noticed will trip up
> new users. Helping these people set up a sane config file works, and I
> do that a lot, but the default settings ought to be sane from the get
> go.
> 

I   would   also   prefer  these  default  values  to  be  inverted  (backward
compatibility...  still  an  issue).  Hopefully  ~/.darcs/defaults  make  this
easier.
msg2274 (view) Author: jch Date: 2007-11-26.23:17:57
This was discussed in detail a couple of years ago.  Basically, David believes
that the current default behaviour is more intuitive and easier to explain.

I happen to disagree with David, so I implemented the --no-set-default option,
and have

  ALL no-set-default

in my ~/.darcs/defaults .

                                                 Juliusz

P.S. I have other disagreements with Darcs' default defaults, so my full
defaults file reads

  ALL no-set-default
  ALL no-test
  send unified
History
Date User Action Args
2007-10-30 18:59:26panu.kalliokoskicreate
2007-10-30 19:10:55koweysetstatus: unread -> unknown
messages: + msg2208
2007-10-30 19:26:08droundysetmessages: + msg2209
2007-10-30 19:33:47panu.kalliokoskisetmessages: + msg2210
2007-10-30 20:14:05alex1setnosy: + darcs-devel, alex1
messages: + msg2212
2007-10-30 20:49:16nicolas.pouillardsetnosy: + nicolas.pouillard
messages: + msg2215
2007-11-26 23:17:58jchsetstatus: unknown -> wont-fix
nosy: + jch
messages: + msg2274
2009-08-06 17:39:48adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, zooko, dagit, mornfall, simon, thorkilnaur, - droundy, jch, alex1, panu.kalliokoski, nicolas.pouillard
2009-08-06 20:36:51adminsetnosy: - beschmi
2009-08-10 22:09:22adminsetnosy: + nicolas.pouillard, jch, panu.kalliokoski, alex1, - markstos, zooko, jast, dagit, Serware, mornfall
2009-08-25 17:53:24adminsetnosy: - simon
2009-08-27 13:52:11adminsetnosy: jch, tommy, kowey, darcs-devel, alex1, thorkilnaur, panu.kalliokoski, nicolas.pouillard, dmitry.kurochkin
2009-10-23 22:34:11adminsetnosy: + alexander, - alex1
2009-10-23 23:43:11adminsetnosy: + alex1, - alexander
2009-10-24 00:04:36adminsetnosy: + ertai, - nicolas.pouillard