summaryrefslogtreecommitdiff
path: root/Upgrade/V0.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-16 02:35:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-16 02:35:48 -0400
commit500c4e44c560a04aaa30e165b70d4d8491ad9c32 (patch)
tree469107a4d132f28ccb1b92fc3b759b91d3956a1f /Upgrade/V0.hs
parenta4d0250298a503c7d9093e6dd1618ff5b07b19e5 (diff)
v1 -> v2 upgrade partially working
still need to move location log files, and auto-commit
Diffstat (limited to 'Upgrade/V0.hs')
-rw-r--r--Upgrade/V0.hs19
1 files changed, 1 insertions, 18 deletions
diff --git a/Upgrade/V0.hs b/Upgrade/V0.hs
index 25b6f2763..5ba305817 100644
--- a/Upgrade/V0.hs
+++ b/Upgrade/V0.hs
@@ -17,10 +17,8 @@ import System.FilePath
import Content
import Types
import Locations
-import qualified GitRepo as Git
import qualified Annex
import Messages
-import Utility
import qualified Upgrade.V1
upgrade :: Annex Bool
@@ -34,26 +32,11 @@ upgrade = do
forM_ keys $ \k -> moveAnnex k $ olddir </> keyFile0 k
-- update the symlinks to the key files
- files <- liftIO $ Git.inRepo g [Git.workTree g]
- fixlinks files
- Annex.queueRun
+ -- No longer needed here; V1.upgrade does the same thing
-- Few people had v0 repos, so go the long way around from 0 -> 1 -> 2
Upgrade.V1.upgrade
- where
- fixlinks [] = return ()
- fixlinks (f:fs) = do
- r <- lookupFile0 f
- case r of
- Nothing -> return ()
- Just (k, _) -> do
- link <- calcGitLink f k
- liftIO $ removeFile f
- liftIO $ createSymbolicLink link f
- Annex.queue "add" [Param "--"] f
- fixlinks fs
-
-- these stayed unchanged between v0 and v1
keyFile0 :: Key -> FilePath
keyFile0 = Upgrade.V1.keyFile1