[darcs-devel] Re: patch for lazy partial repos
Simon Marlow
simonmar at microsoft.com
Thu Apr 12 07:23:59 PDT 2007
Max Battcher wrote:
> This may be completely off the mark, I'm entirely ignorant of how
> partial repositories work (and I've not had the reason to work with
> one thus far), but does darcs need the "url symlink" patches anyway?
>
> Why can't darcs just take on the lazy behavior whenever a patch just
> doesn't exist or is perhaps an empty file or some other similar
> thing... ie, in that changes -v when it needs the information in a
> patch and the patch isn't available couldn't it just attempt an
> auto-pull of that patch from _darcs/prefs/defaultrepo, unless some
> alternative is specified in an argument?
This sounds like much more reasonable behaviour than auto-downloading from the
original location that was specified with 'darcs get'.
I find it hard to pin down exactly what I dislike about --lazy, but it's
something like this: I think of 'darcs get' as like 'cp', but with --lazy it
would be like 'ln -s'. You're specifying exactly what the requirements are --
that the source repository doesn't move -- but to me that's an unreasonable
requirement. The 'cp' semantics are pure, but the 'ln -s' semantics put your
repository in the IO monad!
And I don't have the option to retarget the link later, so if the source repo
does move, I'm hosed. In all other things, darcs is completely agnostic about
the location of a repo, so it seems strange to create a fixed link.
There are other things that could go wrong. For example, I'm used to pulling
from a --partial repo to get a new --partial repo (e.g. the ghc-6.6 repo used to
be partial, it isn't any more).
Personally I'd be happy if darcs said something like:
cannot complete this operation because the following patch is not
available:
"blah blah ..."
please use --full-repo P to specify where to fetch the patch from.
Cheers,
Simon
More information about the darcs-devel
mailing list