summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-23 12:35:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-23 12:35:10 -0400
commit2fbbbd34bcf8e925f84d96510eb063bdfbfe3f9b (patch)
tree887c87998c2cd4df03f08de3b405bfcb96487563
parentf4e2dde8a8ceaf689ec5391174b53cb1b213ea8b (diff)
store from and to repositories separately
-rw-r--r--Commands.hs4
-rw-r--r--Remotes.hs4
2 files changed, 5 insertions, 3 deletions
diff --git a/Commands.hs b/Commands.hs
index cb923d5e5..8be930bcc 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -62,9 +62,9 @@ options = [
"specify default key-value backend to use"
, Option ['k'] ["key"] (ReqArg (storestring "key") "KEY")
"specify a key to use"
- , Option ['t'] ["to"] (ReqArg (storestring "repository") "REPOSITORY")
+ , Option ['t'] ["to"] (ReqArg (storestring "torepository") "REPOSITORY")
"specify a repository to transfer content to"
- , Option ['f'] ["from"] (ReqArg (storestring "repository") "REPOSITORY")
+ , Option ['f'] ["from"] (ReqArg (storestring "fromrepository") "REPOSITORY")
"specify a repository to transfer content from"
]
where
diff --git a/Remotes.hs b/Remotes.hs
index 48ab9ef8c..f24da2c22 100644
--- a/Remotes.hs
+++ b/Remotes.hs
@@ -105,7 +105,9 @@ repoCost r = do
repoNotIgnored :: Git.Repo -> Annex Bool
repoNotIgnored r = do
g <- Annex.gitRepo
- name <- Annex.flagGet "repository"
+ fromName <- Annex.flagGet "fromrepository"
+ toName <- Annex.flagGet "torepository"
+ let name = if (not $ null fromName) then fromName else toName
if (not $ null name)
then return $ match name
else return $ notignored g