darcs

Issue 1384 darcs put fs:d/ --repodir x should initialize d/x, not d.

Title darcs put fs:d/ --repodir x should initialize d/x, not d.
Priority wishlist Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, twb
Assigned To
Topics

Created on 2009-03-07.23:27:09 by twb, last changed 2009-08-27.14:17:00 by admin.

Messages
msg7422 (view) Author: twb Date: 2009-03-07.23:27:06
[DarcsWiki]$ time darcs put --debug cho:public_html/
    Creating repository
    Beginning identifying repository .
    Done identifying repository .
    ssh cho darcs initialize --repodir='public_html' --darcs-2 --hashed
    [...]

I expected this to initialize a directory cho:public_html/DarcsWiki.
Instead it just used cho:public_html -- i.e. it did not check if
public_html is an existing directory.

IMO the put logic for the destination should be the same as the get
logic.  (Maybe it is, and I just need more coffee.)
msg7624 (view) Author: kowey Date: 2009-04-09.11:40:23
Doesn't darcs get foo bar/ initialise a repository bar?

I always get confused about what darcs put does (perhaps the help just needs to
be even more explicit).

Marking wont-fix for now.
msg7683 (view) Author: twb Date: 2009-04-11.09:46:34
On Thu, Apr 09, 2009 at 11:40:25AM -0000, Eric Kow wrote:
> Doesn't darcs get foo bar/ initialise a repository bar?

Sorry, the case is where d/ (or in your case, bar/) already exists.
As it turns out, "darcs get" has the same issue if you supply two
arguments.  I'm not sure what the behaviour should be.

If darcs get/put is conceptually like a recursive cp(1), then
attempting to copy x to y/ where y/ already exists, ought to be the
same as trying to copy x to y/x.

$ with-temp-dir
with-temp-dir: entering directory `/tmp/with-temp-dir.mKisaH'
This directory will be deleted when you exit.
$ darcs init --repo r
$ mkdir d
$ darcs get r d/

darcs failed:  Directory or file named 'd/' already exists.
$ cd d/
$ darcs get ../r
Finished getting.
$ cd ..
$ mkdir e
$ darcs put --repo r e
darcs: /tmp/with-temp-dir.mKisaH/e: createDirectory: already exists (File exists)

$ darcs put --repo r e/r
No patches were selected to put. Nothing to be done.
$
History
Date User Action Args
2009-03-07 23:27:09twbcreate
2009-04-09 11:40:25koweysetpriority: wishlist
status: unread -> wont-fix
messages: + msg7624
nosy: kowey, simon, twb, thorkilnaur, dmitry.kurochkin
2009-04-11 09:46:37twbsetnosy: kowey, simon, twb, thorkilnaur, dmitry.kurochkin
messages: + msg7683
2009-08-25 17:41:49adminsetnosy: + darcs-devel, - simon
2009-08-27 14:17:00adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin