summaryrefslogtreecommitdiff
path: root/Assistant/MakeRemote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-13 14:10:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-13 14:10:29 -0400
commit9a378b18fb1fe1b87bc9182e964eddabb6779b86 (patch)
tree2ec20d46fc60939657725b5e8b7375b1a65f6365 /Assistant/MakeRemote.hs
parent27869d94dfb18784bbd53c4191c2000ee37ff30c (diff)
webapp: Set locally paired repositories to a lower cost than other network remotes.
Diffstat (limited to 'Assistant/MakeRemote.hs')
-rw-r--r--Assistant/MakeRemote.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs
index 113018363..8d4e3a1ba 100644
--- a/Assistant/MakeRemote.hs
+++ b/Assistant/MakeRemote.hs
@@ -20,15 +20,17 @@ import qualified Command.InitRemote
import Logs.UUID
import Logs.Remote
import Git.Remote
+import Config
import qualified Data.Text as T
import qualified Data.Map as M
{- Sets up and begins syncing with a new ssh or rsync remote. -}
-makeSshRemote :: Bool -> SshData -> Assistant Remote
-makeSshRemote forcersync sshdata = do
+makeSshRemote :: Bool -> SshData -> Maybe Int -> Assistant Remote
+makeSshRemote forcersync sshdata mcost = do
r <- liftAnnex $
addRemote $ maker (sshRepoName sshdata) sshurl
+ liftAnnex $ maybe noop (setRemoteCost r) mcost
syncNewRemote r
return r
where