diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-03 22:24:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-03 23:29:48 -0400 |
commit | 8ef2095fa00408ce6729596a42bc0abdc7778098 (patch) | |
tree | d6fc3c9f9519ba2ce617a804ce1c5f33f59a9109 /Upgrade/V2.hs | |
parent | 003a604a6e48a8a0ffd1564e3399b54e8c673e92 (diff) |
factor out common imports
no code changes
Diffstat (limited to 'Upgrade/V2.hs')
-rw-r--r-- | Upgrade/V2.hs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs index 4e686288f..922dfff28 100644 --- a/Upgrade/V2.hs +++ b/Upgrade/V2.hs @@ -7,21 +7,9 @@ module Upgrade.V2 where -import System.Directory -import System.FilePath -import Control.Monad.State (unless, when, liftIO) -import Data.List -import Data.Maybe - -import Types.Key -import Types -import qualified Annex +import AnnexCommon import qualified Git import qualified Branch -import Messages -import Utility -import Utility.Conditional -import Utility.SafeCommand import LocationLog import Content @@ -48,7 +36,7 @@ olddir g upgrade :: Annex Bool upgrade = do showAction "v2 to v3" - g <- Annex.gitRepo + g <- gitRepo let bare = Git.repoIsLocalBare g Branch.create @@ -85,7 +73,7 @@ locationLogs repo = liftIO $ do inject :: FilePath -> FilePath -> Annex () inject source dest = do - g <- Annex.gitRepo + g <- gitRepo new <- liftIO (readFile $ olddir g </> source) Branch.change dest $ \prev -> unlines $ nub $ lines prev ++ lines new @@ -114,7 +102,7 @@ push = do Branch.update -- just in case showAction "pushing new git-annex branch to origin" showOutput - g <- Annex.gitRepo + g <- gitRepo liftIO $ Git.run g "push" [Param "origin", Param Branch.name] _ -> do -- no origin exists, so just let the user |