From 8ef2095fa00408ce6729596a42bc0abdc7778098 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 3 Oct 2011 22:24:57 -0400 Subject: factor out common imports no code changes --- Command/Move.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Command/Move.hs') diff --git a/Command/Move.hs b/Command/Move.hs index 15dae3938..d2870b1e4 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -7,18 +7,14 @@ module Command.Move where -import Control.Monad (when) - +import AnnexCommon import Command import qualified Command.Drop import qualified Annex import LocationLog -import Types import Content import qualified Remote import UUID -import Messages -import Utility.Conditional command :: [Command] command = [repoCommand "move" paramPaths seek @@ -60,7 +56,7 @@ showMoveAction False file = showStart "copy" file remoteHasKey :: Remote.Remote Annex -> Key -> Bool -> Annex () remoteHasKey remote key present = do let remoteuuid = Remote.uuid remote - g <- Annex.gitRepo + g <- gitRepo logChange g key remoteuuid status where status = if present then InfoPresent else InfoMissing @@ -76,7 +72,7 @@ remoteHasKey remote key present = do -} toStart :: Remote.Remote Annex -> Bool -> FilePath -> CommandStart toStart dest move file = isAnnexed file $ \(key, _) -> do - g <- Annex.gitRepo + g <- gitRepo u <- getUUID g ishere <- inAnnex key if not ishere || u == Remote.uuid dest @@ -126,7 +122,7 @@ toCleanup dest move key = do -} fromStart :: Remote.Remote Annex -> Bool -> FilePath -> CommandStart fromStart src move file = isAnnexed file $ \(key, _) -> do - g <- Annex.gitRepo + g <- gitRepo u <- getUUID g remotes <- Remote.keyPossibilities key if u == Remote.uuid src || not (any (== src) remotes) -- cgit v1.2.3