[darcs-users] [issue1176] caches interfere with --remote-repo flag
kowey at darcs.net
Tue Jun 8 09:28:11 UTC 2010
This is potentially turning into a design discussion (that's the
spirit!), so I'm redirecting this to the mailing list,
Eric originally reported:
>> I had my local sprint branch set up with:
>> pull remote-repo http://code.haskell.org/darcs/sprint
>> in its _darcs/prefs/defaults
>> The default repo is kowey at code.haskell.org:/srv/code/darcs/sprint
>> But when I pulled, I kept getting ssh prompts. If I remove the
>> _darcs/prefs/sources file, it does the right thing (pulling via ssh).
>> Wouldn't be the right thing here pulling via http from http://code.haskell.org/darcs/sprint
>> ? <http://code.haskell.org/darcs/sprint> not via ssh.
> Hi Eric, maybe I'm missing something here but :
> When you said ssh prompts, was it prompting from
> kowey at code.haskell.org:/srv/code/darcs/sprint
Right. So the context behind the --remote-repo flag is that it gives
us a way to implement the behaviour of pulling from one repository
(faster HTTP) and pushing to another (SSH)
[This probably would have been rejected or more carefully thought
through if we had a Grumpy Old Man at the time to help us refine the
And my complaint was that despite explicitly using remote-repo so that
push could override the SSH defaultrepo, I was still being asked for my
SSH password when I did a darcs pull.
> Although --remote-repo "rewrites" the defaultrepo, it always contains the
> defaultrepo also in the sources list, that's why it was trying to connect to
> "kowey at ..." (I'm just guessing it was to that one), and darcs always tries
> the repos from the cache rather than the default or the given one.
OK, so what are some ways to tackle the problem? Should defaultrepo go
in the sources list? (Keeping in mind that you may change your
defaultrepo at any time).
Could an extension of your sorting solution be put into place? What I
believe and sincerely *hope* happens is that it's still treating the
(HTTP) remote-repo repository as the repo to pull from, and that the
only reason I see SSH password prompts is because of sources.
> Now thinking about it, I don't see how could probably be useful having the
> defaultrepo also replied in the cache if it is remote, obviously the local
> ones would be really useful, but having remotes repos in sources, force us
> to establish a connection ( which I could have done with the given repo or
> defaultrepo ), not really contributing that much to performance, so it
> sounds to me like we shouldn't save ( by default) remote repositories in the
So it sounds like this could be problematic for the case of lazy
repositories (http://example.com/lazy-branch comes from
http://otherexample.com/main-repo). We also want to Darcs to do the
safest thing by default, not necessarily the fastest.
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the darcs-users