[darcs-users] [patch277] Resolve issue 1176: caches interfere with --remote-rep...

Adolfo Builes builes.adolfo at googlemail.com
Tue Jun 15 02:24:55 UTC 2010


Hi Eric

On Sun, Jun 13, 2010 at 3:27 PM, Eric Kow <kowey at darcs.net> wrote:

> On Sun, Jun 13, 2010 at 20:06:13 +0000, Adolfo Builes wrote:
> > -      addLocal repo repos = modifyCache repo $ \ (Ca cache) -> Ca $
> [Cache DarcsCache.Repo NotWritable r | r <- repos, isFile r ] ++ cache
> > +      addRepos repo repos = modifyCache repo $ \ (Ca cache) -> Ca $ [
> toCache r | r <- repos ] ++
>
> Hmm, now you're adding all the explicitly requested repos (which is
> fine), but you're sorting them... shouldn't these be sorted in locality
> order?
>
>
I realized I don't need to add "[ toCache r | RemoteRepo r <- opts]" since
that would be a contradiction  to what the manual says

  On the other hand, if any other repositories are supplied as command line
> arguments, this flag will be ignored (and the default repository may be
> overwritten).


And if not command line arguments are given so the repos content would be
the one you give it with --remote-repo :).

So actually to solved this problem is just question of having the sources
sorted as discussed: local < http < ssh.

What I did is that I put the function to keep the caches sorted in the
modifyCache function, so no matter what is done in the cache, it will be
always sorted.

And about the trivia I just dig in changes and ended up in Neil Mitchell's
blog, I see now the need  for --remote-repo ;).
I think the main point here is the fact that  explicitly passed rewrite you
default-repo and you don't want that to happen when the repo you are pulling
from is just  a mean to avoid firewalls, certainly we all have had that bad
experience of ssh port blocked, than happens in my university as well :S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100614/c482715e/attachment.html>


More information about the darcs-users mailing list