webapp: Set locally paired repositories to a lower cost than other network remotes.
This commit is contained in:
parent
02facde154
commit
9b657a2ccc
7 changed files with 28 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue