[darcs-users] [BUG] darcs push --dry-run fails

David Roundy droundy at abridgegame.org
Wed Jun 30 10:11:12 UTC 2004


On Tue, Jun 29, 2004 at 09:11:44PM +0200, Juliusz Chroboczek wrote:
> >> You'd need to manually remove _darcs/prefs/lastrepo in order to
> >> switch parents.
> 
> PL> Ah, that's what you meant :)
> 
> PL> Yes, I personally like it a lot, but I fear the user interface
> PL> will become less discoverable than what it is now.
> 
> Well, naive users don't use multiple repos, they usually just pull,
> record and send.  So they shouldn't even notice the change.
> 
> Experienced users define a standard flow of patches between a number
> of local repos, and occasionally cherry-pick a patch from a repo that
> is not the parent.  So sticky parents is what they want.

*Really* experienced users always know what their lastrepo is... :)

> Now non-sticky parents are very dangerous if you work with multiple
> branches, and I think that the danger is serious enough to warrant
> darcs getting in your way a wee bit.  I've got two branches: polipo,
> which contains all my current work, and polipo-stable, which only gets
> bug fixes.  Most of the time, I implement a bug fix in polipo-stable,
> and pull it into polipo.  However, once in a while, I do the opposite:
> I implement a bug fix in polipo, and pull it into polipo-stable.  I'm
> afraid to think about the mess that I'll have to fix when I forget to
> reset polipo-stable/lastrepo after the pull.

This is the reason darcs always tells you what repository it's
pulling/pushing from.

> (Once again, I'm getting the feeling that I'm the only person trying
> to use darcs with multiple branches.)

While I haven't used darcs with long-term multiple branches, certainly
multiple temporary (by temporary I mean that *eventually* everything will
be merged or the changes will be discarded) is the norm.


Back to the subject of sticky lastrepo... I like the current behavior.  It
is very easy to describe ("darcs pull with no arguments pulls from the last
repo from which you pulled, pushed or sent") and is unambiguous.  If we're
going to change this behavior, certainly we shouldn't call the repo
"lastrepo" and I'd rather call it "defaultrepo" than a "parent", since
there's really no parent-child relationship here... that is, there's no
reason to believe that it is asymmetrical.

My proposal would be to add to push/pull/send a --set-default and
--dont-set-default flag, which would control whether the defaultrepo is
reset.  Then

echo ALL dont-set-default >> _darcs/prefs/defaults

would implement your proposed sticky behavior, and

echo ALL set-default >> _darcs/prefs/defaults

would implement the current behavior, and in either case, one could
occasionally use the converse flag to reverse the behavior.  i.e. if the
default remains as it is, one could

darcs pull --dont-set-default ../temporary_repo

and if the default is sticky one could modify the parent with

darcs pull --set-default http://real_parent
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list