First two patches are cleanups that could have gone into my previous
bundle (sorry).
Third one is needed to make the "resolve issue1066" one work.
It makes the assumption that a user passes the `--complete`
flag precisely to not tolerate CTRL+C of it. It will be used
in the next patch to ensure that cloning to ssh destination only
carries on if a *complete* local clone is done.
Teh fourth patch implements <http://bugs.darcs.net/issue1066>:
"make darcs put 'get' to a temporary directory and copy it over".
`darcs put` is the legendary inefficient command that mirrors `get`,
enabling to clone an existing (local) repo to a remote ssh host.
It works by relying on a remote darcs executable that does an `init`
at the specified url, then pushes patches to the new remote one.
See <http://lists.osuosl.org/pipermail/darcs-users/2008-December/016409.html>
for complains against `put` , and
<http://lists.osuosl.org/pipermail/darcs-users/2008-December/016415.html>
and
<http://lists.osuosl.org/pipermail/darcs-users/2008-December/016451.html>
for a description of the typical use case of `put` and arguments in favor
of keeping it.
My personal issue with put is not that it is inefficient, but rather that
is is almost the same as get. This has implications in terms of maintainability:
improvements we bring to `get` must be manually ported to `put`.
So I made that `get` work with ssh destination url, by locally
cloning source repository to a temporary directory and then scp'ing it.
The essential difference with respect to normal `get` is that the new
repository does not know about the old one, so:
* cloning must be complete
* sources and caches must not be copied
As for the rest, you can still pass the usual flags or matchers.
(You'll probably want to pass --no-working-dir; mercurial does it
by default in that case, but I'm not sure the user always wants it.)
Note that the remote host does not need to have darcs installed for
this to work. At fist I wanted to add a warning in case no remote
darcs was detected, but I finally thought it was too verbose.
Now for the two last patches.
First, if we can do `darcs get . host:newrepo`, `put` is no longer
needed. I'm not even sure about keeping it as an alias.
I think from the links above that some people want the feature to
exist, but are "power user" enough to adapt to another name.
And finally, if `get` can work in any direction, I feel that `clone`
is a more natural default name for it. This time it is important to
keep `get` as an alias for it, for obvious reasons.
See also <http://darcs.net/RosettaStone#recommendations-for-unification>.
6 patches for repository http://darcs.net:
Mon Apr 21 10:39:38 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* create inventories subdir at darcs init
Thu Apr 24 13:59:29 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* do not print message twice when patches pack grabbing fails
Fri Apr 25 02:34:40 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* do not tolerate ctrl+c when --complete is passed
Fri Apr 25 03:06:47 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* resolve issue1066: clone to ssh URL by locally cloning then copying by scp
Introduce an internal flag ForgetParent that enable to clone
repositories while forgetting about their source (do not copy
sources nor caches).
Fri Apr 25 03:32:25 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* remove Put since Get can clone to ssh destination faster
Fri Apr 25 14:52:10 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* rename get to clone
Attachments
|