[darcs-users] [darcs #225] Add new put command complementary to get.
Mark Stosberg via RT
bugs-comment at darcs.net
Mon Mar 21 18:28:56 UTC 2005
I've how had a chance to try 'put', review the docs, and I even wrote
some first automated tests for.
After this "test drive", I think I'm switching my backing from the "put"
camp to the "clone" camp.
"put" and "get" are just too similar. These do the same thing:
get ./repo1 ./repo2
put ./repo1 ./repo2
You can even "put" with 'get' already!
get . ../repo2
The only thing you can't do with 'get' right now is have a remote
machine as the target:
get . mark at otherhost:/repo2
That in itself seems like an artificial limitation, considering darcs
can easily handle repo addresses. If that was added to 'get', the ony
difference left between 'get' and 'put' would the single argument version:
get ../repo1 # copy ../repo1 to ./repo1
put ../repo1 # put current repo to ../repo1
...and those are confusing because they aren't perfectly symettric--
'get' creates a new directory for the target, while 'put' uses the
current directory for the source.
Is it possible that 'clone' could reasonable distinquish what to do with
a single argument depending on the context?
# outside of a darcs repo, 'clone' "gets" the single argument, just like
get works now
$ darcs clone ../other_repo
# inside of a repo, perhaps ask to be sure
darcs clone ../other_repo
Clone current repo to ../other_repo?
In the rare case where you want to clone into a sub-repo, you can use
the two argument version.
More information about the darcs-users