add explicit upgrade command
This commit is contained in:
parent
bc21502b9a
commit
d7ef5fd294
5 changed files with 34 additions and 3 deletions
22
Command/Upgrade.hs
Normal file
22
Command/Upgrade.hs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{- git-annex command
|
||||||
|
-
|
||||||
|
- Copyright 2011 Joey Hess <joey@kitenet.net>
|
||||||
|
-
|
||||||
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
|
-}
|
||||||
|
|
||||||
|
module Command.Upgrade where
|
||||||
|
|
||||||
|
import Command
|
||||||
|
|
||||||
|
command :: [Command]
|
||||||
|
command = [Command "upgrade" paramNothing seek "upgrade repository layout"]
|
||||||
|
|
||||||
|
seek :: [CommandSeek]
|
||||||
|
seek = [withNothing start]
|
||||||
|
|
||||||
|
start :: CommandStartNothing
|
||||||
|
start = do
|
||||||
|
-- The actual upgrading is handled by just running any command,
|
||||||
|
-- so nothing extra needs to be done.
|
||||||
|
return $ Just $ return $ Just $ return True
|
|
@ -41,6 +41,7 @@ import qualified Command.Trust
|
||||||
import qualified Command.Untrust
|
import qualified Command.Untrust
|
||||||
import qualified Command.Semitrust
|
import qualified Command.Semitrust
|
||||||
import qualified Command.Map
|
import qualified Command.Map
|
||||||
|
import qualified Command.Upgrade
|
||||||
|
|
||||||
cmds :: [Command]
|
cmds :: [Command]
|
||||||
cmds = concat
|
cmds = concat
|
||||||
|
@ -70,6 +71,7 @@ cmds = concat
|
||||||
, Command.Whereis.command
|
, Command.Whereis.command
|
||||||
, Command.Migrate.command
|
, Command.Migrate.command
|
||||||
, Command.Map.command
|
, Command.Map.command
|
||||||
|
, Command.Upgrade.command
|
||||||
]
|
]
|
||||||
|
|
||||||
options :: [Option]
|
options :: [Option]
|
||||||
|
|
|
@ -104,7 +104,7 @@ updateSymlinks = do
|
||||||
liftIO $ removeFile f
|
liftIO $ removeFile f
|
||||||
liftIO $ createSymbolicLink link f
|
liftIO $ createSymbolicLink link f
|
||||||
Annex.queue "add" [Param "--"] f
|
Annex.queue "add" [Param "--"] f
|
||||||
Annex.queueRunAt 1024
|
Annex.queueRunAt 10240
|
||||||
|
|
||||||
moveLocationLogs :: Annex ()
|
moveLocationLogs :: Annex ()
|
||||||
moveLocationLogs = do
|
moveLocationLogs = do
|
||||||
|
@ -132,7 +132,7 @@ moveLocationLogs = do
|
||||||
Annex.queue "add" [Param "--"] dest
|
Annex.queue "add" [Param "--"] dest
|
||||||
Annex.queue "add" [Param "--"] f
|
Annex.queue "add" [Param "--"] f
|
||||||
Annex.queue "rm" [Param "--quiet", Param "-f", Param "--"] f
|
Annex.queue "rm" [Param "--quiet", Param "-f", Param "--"] f
|
||||||
Annex.queueRunAt 1024
|
Annex.queueRunAt 10240
|
||||||
|
|
||||||
oldlog2key :: FilePath -> Maybe (FilePath, Key)
|
oldlog2key :: FilePath -> Maybe (FilePath, Key)
|
||||||
oldlog2key l =
|
oldlog2key l =
|
||||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -3,7 +3,8 @@ git-annex (0.20110316) UNRELEASED; urgency=low
|
||||||
* New repository format, annex.version=2.
|
* New repository format, annex.version=2.
|
||||||
* The first time git-annex is run in an old format repository, it
|
* The first time git-annex is run in an old format repository, it
|
||||||
will automatically upgrade it to the new format, staging all
|
will automatically upgrade it to the new format, staging all
|
||||||
necessary changes to git.
|
necessary changes to git. See <http://git-annex.branchable.com/upgrades/>
|
||||||
|
for details.
|
||||||
* Colons are now avoided in filenames, so bare clones of git repos
|
* Colons are now avoided in filenames, so bare clones of git repos
|
||||||
can be put on USB thumb drives formatted with vFAT or similar
|
can be put on USB thumb drives formatted with vFAT or similar
|
||||||
filesystems.
|
filesystems.
|
||||||
|
|
|
@ -261,6 +261,12 @@ Many git-annex commands will stage changes for later `git commit` by you.
|
||||||
|
|
||||||
git annex setkey --key=WORM-s3-m1287765018--file /tmp/file
|
git annex setkey --key=WORM-s3-m1287765018--file /tmp/file
|
||||||
|
|
||||||
|
* upgrade
|
||||||
|
|
||||||
|
Upgrades the repository to current layout. Upgrades are done automatically
|
||||||
|
whenever a newer git annex encounters an old repository; this command
|
||||||
|
allows explcitly starting an upgrade.
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
* --force
|
* --force
|
||||||
|
|
Loading…
Reference in a new issue