darcs

Patch 1145 create inventories subdir at darcs init (and 5 more)

Title create inventories subdir at darcs init (and 5 more)
Superseder Nosy List gh
Related Issues
Status accepted Assigned To
Milestone

Created on 2014-04-25.17:54:28 by gh, last changed 2014-05-04.20:16:33 by gh.

Files
File name Status Uploaded Type Edit Remove
create-inventories-subdir-at-darcs-init.dpatch gh, 2014-04-25.17:54:27 application/x-darcs-patch
patch-preview.txt gh, 2014-04-25.17:54:27 text/x-darcs-patch
patch-preview.txt gh, 2014-04-25.21:19:51 text/x-darcs-patch
unnamed gh, 2014-04-25.17:54:27
unnamed gh, 2014-04-25.21:19:51
update-packs-tests-to-new-strings.dpatch gh, 2014-04-25.21:19:51 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg17395 (view) Author: gh Date: 2014-04-25.17:54:27
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
msg17397 (view) Author: gh Date: 2014-04-25.21:19:51
1 patch for repository http://darcs.net:

Fri Apr 25 18:18:32 ART 2014  Guillaume Hoffmann <guillaumh@gmail.com>
  * update packs tests to new strings
Attachments
msg17426 (view) Author: gh Date: 2014-05-04.20:16:22
Self-accept.
History
Date User Action Args
2014-04-25 17:54:28ghcreate
2014-04-25 19:45:06ghsetstatus: needs-screening -> needs-review
2014-04-25 21:19:51ghsetfiles: + patch-preview.txt, update-packs-tests-to-new-strings.dpatch, unnamed
messages: + msg17397
2014-05-04 20:16:22ghsetmessages: + msg17426
2014-05-04 20:16:33ghsetstatus: needs-review -> accepted