summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Backend/File.hs2
-rw-r--r--Command/Get.hs11
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/fsck_output.mdwn2
-rw-r--r--doc/git-annex.mdwn2
-rw-r--r--doc/walkthrough/getting_file_content.mdwn4
-rw-r--r--doc/walkthrough/transferring_files:_When_things_go_wrong.mdwn2
-rw-r--r--doc/walkthrough/using_ssh_remotes.mdwn2
8 files changed, 17 insertions, 9 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index bf21224a9..386af0266 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -81,7 +81,7 @@ copyKeyFile key file = do
Left _ -> return False
else return True
docopy r continue = do
- showNote $ "copying from " ++ Remote.name r ++ "..."
+ showNote $ "from " ++ Remote.name r ++ "..."
copied <- Remote.retrieveKeyFile r key file
if copied
then return True
diff --git a/Command/Get.hs b/Command/Get.hs
index 90c054096..50dc009fe 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -9,9 +9,12 @@ module Command.Get where
import Command
import qualified Backend
+import qualified Annex
+import qualified Remote
import Types
import Content
import Messages
+import qualified Command.Move
command :: [Command]
command = [repoCommand "get" paramPath seek
@@ -20,7 +23,6 @@ command = [repoCommand "get" paramPath seek
seek :: [CommandSeek]
seek = [withFilesInGit start]
-{- Gets an annexed file from one of the backends. -}
start :: CommandStartString
start file = isAnnexed file $ \(key, backend) -> do
inannex <- inAnnex key
@@ -28,7 +30,12 @@ start file = isAnnexed file $ \(key, backend) -> do
then stop
else do
showStart "get" file
- next $ perform key backend
+ from <- Annex.getState Annex.fromremote
+ case from of
+ Nothing -> next $ perform key backend
+ Just name -> do
+ src <- Remote.byName name
+ next $ Command.Move.fromPerform src False key
perform :: Key -> Backend Annex -> CommandPerform
perform key backend = do
diff --git a/debian/changelog b/debian/changelog
index 8cb256099..4fe1febd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ git-annex (0.20110602) UNRELEASED; urgency=low
* Add --numcopies option.
* Add --trust, --untrust, and --semitrust options.
+ * get --from is the same as copy --from
-- Joey Hess <joeyh@debian.org> Wed, 01 Jun 2011 16:26:48 -0400
diff --git a/doc/bugs/fsck_output.mdwn b/doc/bugs/fsck_output.mdwn
index 3ded1b409..90af1600d 100644
--- a/doc/bugs/fsck_output.mdwn
+++ b/doc/bugs/fsck_output.mdwn
@@ -30,7 +30,7 @@ The newline is in the wrong place and confuses the user. It should be printed _a
> A related problem occurs if an error message is unexpetedly printed.
> Dummying up an example:
>
-> O get test1 (copying from foo...) E git-annex: failed to run ssh
+> O get test1 (from foo...) E git-annex: failed to run ssh
> failed
>
> --[[Joey]]
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index b15ce1a29..25f053af6 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -41,7 +41,7 @@ content from the key-value store.
# sudo mount /media/usb
# git remote add usbdrive /media/usb
# git annex get video/hackity_hack_and_kaxxt.mov
- get video/hackity_hack_and_kaxxt.mov (copying from usbdrive...) ok
+ get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
# git commit -a -m "got a video I want to rewatch on the plane"
# git annex add iso
diff --git a/doc/walkthrough/getting_file_content.mdwn b/doc/walkthrough/getting_file_content.mdwn
index 5c899ee3c..bf45fd97f 100644
--- a/doc/walkthrough/getting_file_content.mdwn
+++ b/doc/walkthrough/getting_file_content.mdwn
@@ -8,8 +8,8 @@ USB drive.
# cd /media/usb/annex
# git pull laptop master
# git annex get .
- get my_cool_big_file (copying from laptop...) ok
- get iso/debian.iso (copying from laptop...) ok
+ get my_cool_big_file (from laptop...) ok
+ get iso/debian.iso (from laptop...) ok
Notice that you had to git pull from laptop first, this lets git-annex know
what has changed in laptop, and so it knows about the files present there and
diff --git a/doc/walkthrough/transferring_files:_When_things_go_wrong.mdwn b/doc/walkthrough/transferring_files:_When_things_go_wrong.mdwn
index d8f0a19bd..936d088f1 100644
--- a/doc/walkthrough/transferring_files:_When_things_go_wrong.mdwn
+++ b/doc/walkthrough/transferring_files:_When_things_go_wrong.mdwn
@@ -14,5 +14,5 @@ it:
failed
# sudo mount /media/usb
# git annex get video/hackity_hack_and_kaxxt.mov
- get video/hackity_hack_and_kaxxt.mov (copying from usbdrive...) ok
+ get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
# git commit -a -m "got a video I want to rewatch on the plane"
diff --git a/doc/walkthrough/using_ssh_remotes.mdwn b/doc/walkthrough/using_ssh_remotes.mdwn
index 4c2f830de..fbbbbe070 100644
--- a/doc/walkthrough/using_ssh_remotes.mdwn
+++ b/doc/walkthrough/using_ssh_remotes.mdwn
@@ -12,7 +12,7 @@ to clone the laptop's annex to it:
Now you can get files and they will be transferred (using `rsync` via `ssh`):
# git annex get my_cool_big_file
- get my_cool_big_file (getting UUID for origin...) (copying from origin...)
+ get my_cool_big_file (getting UUID for origin...) (from origin...)
WORM-s2159-m1285650548--my_cool_big_file 100% 2159 2.1KB/s 00:00
ok