rename --ingroup to --inallgroup

This commit is contained in:
Joey Hess 2012-10-10 12:59:45 -04:00
parent 725b6b5156
commit b6ce003843
5 changed files with 15 additions and 9 deletions

View file

@ -147,7 +147,7 @@ options = Option.common ++
"skip files with fewer copies" "skip files with fewer copies"
, Option ['B'] ["inbackend"] (ReqArg Limit.addInBackend paramName) , Option ['B'] ["inbackend"] (ReqArg Limit.addInBackend paramName)
"skip files not using a key-value backend" "skip files not using a key-value backend"
, Option [] ["ingroup"] (ReqArg Limit.addInGroup paramGroup) , Option [] ["inallgroup"] (ReqArg Limit.addInAllGroup paramGroup)
"skip files not present in all remotes in a group" "skip files not present in all remotes in a group"
, Option [] ["largerthan"] (ReqArg Limit.addLargerThan paramSize) , Option [] ["largerthan"] (ReqArg Limit.addLargerThan paramSize)
"skip files larger than a size" "skip files larger than a size"

View file

@ -139,13 +139,13 @@ limitCopies want = case split ":" want of
{- Adds a limit to skip files not believed to be present in all {- Adds a limit to skip files not believed to be present in all
- repositories in the specified group. -} - repositories in the specified group. -}
addInGroup :: String -> Annex () addInAllGroup :: String -> Annex ()
addInGroup groupname = do addInAllGroup groupname = do
m <- groupMap m <- groupMap
addLimit $ limitInGroup m groupname addLimit $ limitInAllGroup m groupname
limitInGroup :: GroupMap -> MkLimit limitInAllGroup :: GroupMap -> MkLimit
limitInGroup m groupname limitInAllGroup m groupname
| S.null want = Right $ const $ const $ return True | S.null want = Right $ const $ const $ return True
| otherwise = Right $ \notpresent -> | otherwise = Right $ \notpresent ->
Backend.lookupFile >=> check notpresent Backend.lookupFile >=> check notpresent

View file

@ -102,7 +102,7 @@ parseToken groupmap t
, ("inbackend", limitInBackend) , ("inbackend", limitInBackend)
, ("largerthan", limitSize (>)) , ("largerthan", limitSize (>))
, ("smallerthan", limitSize (<)) , ("smallerthan", limitSize (<))
, ("ingroup", limitInGroup groupmap) , ("inallgroup", limitInAllGroup groupmap)
] ]
use a = Utility.Matcher.Operation <$> a v use a = Utility.Matcher.Operation <$> a v

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
git-annex (3.20121010) UNRELEASED; urgency=low
* Renamed --ingroup to --inallgroup.
-- Joey Hess <joeyh@debian.org> Wed, 10 Oct 2012 12:59:25 -0400
git-annex (3.20121009) unstable; urgency=low git-annex (3.20121009) unstable; urgency=low
* watch, assistant: It's now safe to git annex unlock files while * watch, assistant: It's now safe to git annex unlock files while

View file

@ -636,14 +636,14 @@ file contents are present at either of two repositories.
Matches only files that git-annex believes have the specified number of Matches only files that git-annex believes have the specified number of
copies, on remotes in the specified group. For example, copies, on remotes in the specified group. For example,
"--copies=archival:2" "--copies=archive:2"
* --inbackend=name * --inbackend=name
Matches only files whose content is stored using the specified key-value Matches only files whose content is stored using the specified key-value
backend. backend.
* --ingroup=groupname * --inallgroup=groupname
Matches only files that git-annex believes are present in all repositories Matches only files that git-annex believes are present in all repositories
in the specified group. in the specified group.