rename status to info, and update docs
This commit is contained in:
parent
4eeebf162f
commit
eed2ed4fdb
8 changed files with 27 additions and 24 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
{-# LANGUAGE BangPatterns #-}
|
||||
|
||||
module Command.Status where
|
||||
module Command.Info where
|
||||
|
||||
import "mtl" Control.Monad.State.Strict
|
||||
import qualified Data.Map as M
|
||||
|
@ -70,31 +70,31 @@ data StatInfo = StatInfo
|
|||
type StatState = StateT StatInfo Annex
|
||||
|
||||
def :: [Command]
|
||||
def = [noCommit $ command "status" paramPaths seek
|
||||
SectionQuery "shows status information about the annex"]
|
||||
def = [noCommit $ command "info" paramPaths seek
|
||||
SectionQuery "shows general information about the annex"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
seek = [withWords start]
|
||||
|
||||
start :: [FilePath] -> CommandStart
|
||||
start [] = do
|
||||
globalStatus
|
||||
globalInfo
|
||||
stop
|
||||
start ps = do
|
||||
mapM_ localStatus =<< filterM isdir ps
|
||||
mapM_ localInfo =<< filterM isdir ps
|
||||
stop
|
||||
where
|
||||
isdir = liftIO . catchBoolIO . (isDirectory <$$> getFileStatus)
|
||||
|
||||
globalStatus :: Annex ()
|
||||
globalStatus = do
|
||||
globalInfo :: Annex ()
|
||||
globalInfo = do
|
||||
stats <- selStats global_fast_stats global_slow_stats
|
||||
showCustom "status" $ do
|
||||
showCustom "info" $ do
|
||||
evalStateT (mapM_ showStat stats) (StatInfo Nothing Nothing Nothing)
|
||||
return True
|
||||
|
||||
localStatus :: FilePath -> Annex ()
|
||||
localStatus dir = showCustom (unwords ["status", dir]) $ do
|
||||
localInfo :: FilePath -> Annex ()
|
||||
localInfo dir = showCustom (unwords ["info", dir]) $ do
|
||||
stats <- selStats (tostats local_fast_stats) (tostats local_slow_stats)
|
||||
evalStateT (mapM_ showStat stats) =<< getLocalStatInfo dir
|
||||
return True
|
||||
|
@ -295,7 +295,7 @@ cachedReferencedData = do
|
|||
put s { referencedData = Just v }
|
||||
return v
|
||||
|
||||
-- currently only available for local status
|
||||
-- currently only available for local info
|
||||
cachedNumCopiesStats :: StatState (Maybe NumCopiesStats)
|
||||
cachedNumCopiesStats = numCopiesStats <$> get
|
||||
|
|
@ -46,7 +46,7 @@ import qualified Command.Whereis
|
|||
import qualified Command.List
|
||||
import qualified Command.Log
|
||||
import qualified Command.Merge
|
||||
import qualified Command.Status
|
||||
import qualified Command.Info
|
||||
import qualified Command.Migrate
|
||||
import qualified Command.Uninit
|
||||
import qualified Command.Trust
|
||||
|
@ -140,7 +140,7 @@ cmds = concat
|
|||
, Command.List.def
|
||||
, Command.Log.def
|
||||
, Command.Merge.def
|
||||
, Command.Status.def
|
||||
, Command.Info.def
|
||||
, Command.Migrate.def
|
||||
, Command.Map.def
|
||||
, Command.Direct.def
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -6,6 +6,9 @@ git-annex (5.20131102) UNRELEASED; urgency=low
|
|||
* annex.version is now set to 5 for direct mode repositories.
|
||||
This upgrade is handled fully automatically, no need to run
|
||||
git annex upgrade
|
||||
* The "status" command has been renamed to "info", to allow
|
||||
"git annex status" to be used in direct mode repositories, now that
|
||||
"git status" won't work in them.
|
||||
* The -c option now not only modifies the git configuration seen by
|
||||
git-annex, but it is passed along to every git command git-annex runs.
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ Now configure the remote and do the initial push:
|
|||
git remote add origin example.com:bare-annex.git
|
||||
git push origin master git-annex
|
||||
|
||||
Now `git annex status` should show the configured bare remote. If it does not, you may have to pull from the remote first (older versions of `git-annex`)
|
||||
Now `git annex info` should show the configured bare remote. If it does not, you may have to pull from the remote first (older versions of `git-annex`)
|
||||
|
||||
If you wish to configure git such that you can push/pull without arguments, set the upstream branch:
|
||||
|
||||
|
|
|
@ -607,23 +607,23 @@ subdirectories).
|
|||
To generate output suitable for the gource visualisation program,
|
||||
specify `--gource`.
|
||||
|
||||
* `status [directory ...]`
|
||||
* `info [directory ...]`
|
||||
|
||||
Displays some statistics and other information, including how much data
|
||||
is in the annex and a list of all known repositories.
|
||||
|
||||
To only show the data that can be gathered quickly, use `--fast`.
|
||||
|
||||
When a directory is specified, shows a differently formatted status
|
||||
When a directory is specified, shows a differently formatted info
|
||||
display for that directory. In this mode, all of the file matching
|
||||
options can be used to filter the files that will be included in
|
||||
the status.
|
||||
the information.
|
||||
|
||||
For example, suppose you want to run "git annex get .", but
|
||||
would first like to see how much disk space that will use.
|
||||
Then run:
|
||||
|
||||
git annex status --fast . --not --in here
|
||||
git annex info --fast . --not --in here
|
||||
|
||||
* `map`
|
||||
|
||||
|
@ -797,7 +797,7 @@ subdirectories).
|
|||
Rather than the normal output, generate JSON. This is intended to be
|
||||
parsed by programs that use git-annex. Each line of output is a JSON
|
||||
object. Note that json output is only usable with some git-annex commands,
|
||||
like status and find.
|
||||
like info and find.
|
||||
|
||||
* `--debug`
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ Here are all the supported configuration settings.
|
|||
up to 500000 keys. If your repository is larger than that,
|
||||
you can adjust this to avoid `git annex unused` not noticing some unused
|
||||
data files. Increasing this will make `git-annex unused` consume more memory;
|
||||
run `git annex status` for memory usage numbers.
|
||||
run `git annex info` for memory usage numbers.
|
||||
|
||||
* `annex.bloomaccuracy`
|
||||
|
||||
|
@ -1105,7 +1105,7 @@ Here are all the supported configuration settings.
|
|||
`git annex unused`. The default accuracy is 1000 --
|
||||
1 unused file out of 1000 will be missed by `git annex unused`. Increasing
|
||||
the accuracy will make `git annex unused` consume more memory;
|
||||
run `git annex status` for memory usage numbers.
|
||||
run `git annex info` for memory usage numbers.
|
||||
|
||||
* `annex.sshcaching`
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Now you can run normal annex operations, as long as the port forwarding shell is
|
|||
|
||||
git annex sync
|
||||
git annex get on-the-go some/big/file
|
||||
git annex status
|
||||
git annex info
|
||||
|
||||
You can add more computers by repeating with a different port, e.g. 2202 or 2203 (or any other).
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ On `angela`, we want to synchronise the git annex metadata with `marcos`. We nee
|
|||
git init
|
||||
git remote add marcos marcos.example.com:/srv/mp3
|
||||
git fetch marcos
|
||||
git annex status # this should display the two repos
|
||||
git annex info # this should display the two repos
|
||||
git annex add .
|
||||
|
||||
This will, again, checksum all files and add them to git annex. Once that is done, you can verify that the files are really the same as marcos with `whereis`:
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
subject="comment 1"
|
||||
date="2013-07-12T19:36:28Z"
|
||||
content="""
|
||||
Ah, I just found that git annex status can do the same :)
|
||||
Ah, I just found that git annex info can do the same :)
|
||||
Disregard this.
|
||||
"""]]
|
||||
|
|
Loading…
Reference in a new issue