From 2fbbbd34bcf8e925f84d96510eb063bdfbfe3f9b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 23 Oct 2010 12:35:10 -0400 Subject: [PATCH] store from and to repositories separately --- Commands.hs | 4 ++-- Remotes.hs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Commands.hs b/Commands.hs index cb923d5e59..8be930bcc1 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 48ab9ef8c0..f24da2c222 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