manual and source repository groups
This commit is contained in:
parent
8a906b7056
commit
6a067e5c28
6 changed files with 58 additions and 6 deletions
|
@ -7,7 +7,14 @@
|
|||
|
||||
module Types.StandardGroups where
|
||||
|
||||
data StandardGroup = ClientGroup | TransferGroup | BackupGroup | SmallArchiveGroup | FullArchiveGroup
|
||||
data StandardGroup
|
||||
= ClientGroup
|
||||
| TransferGroup
|
||||
| BackupGroup
|
||||
| SmallArchiveGroup
|
||||
| FullArchiveGroup
|
||||
| SourceGroup
|
||||
| ManualGroup
|
||||
deriving (Eq, Ord, Enum, Bounded, Show)
|
||||
|
||||
fromStandardGroup :: StandardGroup -> String
|
||||
|
@ -16,6 +23,8 @@ fromStandardGroup TransferGroup = "transfer"
|
|||
fromStandardGroup BackupGroup = "backup"
|
||||
fromStandardGroup SmallArchiveGroup = "smallarchive"
|
||||
fromStandardGroup FullArchiveGroup = "archive"
|
||||
fromStandardGroup SourceGroup = "source"
|
||||
fromStandardGroup ManualGroup = "manual"
|
||||
|
||||
toStandardGroup :: String -> Maybe StandardGroup
|
||||
toStandardGroup "client" = Just ClientGroup
|
||||
|
@ -23,6 +32,8 @@ toStandardGroup "transfer" = Just TransferGroup
|
|||
toStandardGroup "backup" = Just BackupGroup
|
||||
toStandardGroup "smallarchive" = Just SmallArchiveGroup
|
||||
toStandardGroup "archive" = Just FullArchiveGroup
|
||||
toStandardGroup "source" = Just SourceGroup
|
||||
toStandardGroup "manual" = Just ManualGroup
|
||||
toStandardGroup _ = Nothing
|
||||
|
||||
descStandardGroup :: StandardGroup -> String
|
||||
|
@ -31,6 +42,8 @@ descStandardGroup TransferGroup = "transfer: distributes files to clients"
|
|||
descStandardGroup BackupGroup = "backup: backs up all files"
|
||||
descStandardGroup SmallArchiveGroup = "small archive: archives files located in \"archive\" directories"
|
||||
descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere"
|
||||
descStandardGroup SourceGroup = "file source: moves files on to other repositories"
|
||||
descStandardGroup ManualGroup = "manual mode: only stores files you manually choose"
|
||||
|
||||
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
|
||||
preferredContent :: StandardGroup -> String
|
||||
|
@ -39,3 +52,5 @@ preferredContent TransferGroup = "not (inallgroup=client and copies=client:2) an
|
|||
preferredContent BackupGroup = "include=*"
|
||||
preferredContent SmallArchiveGroup = "(include=*/archive/* or include=archive/*) and " ++ preferredContent FullArchiveGroup
|
||||
preferredContent FullArchiveGroup = "not (copies=archive:1 or copies=smallarchive:1)"
|
||||
preferredContent SourceGroup = "not (copies=1)"
|
||||
preferredContent ManualGroup = "present and exclude=archive/*"
|
||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,4 +1,4 @@
|
|||
git-annex (3.20130115) UNRELEASED; urgency=low
|
||||
git-annex (3.20130122) UNRELEASED; urgency=low
|
||||
|
||||
* webapp: More adjustments to longpoll code to deal with changes in
|
||||
variable quoting in different versions of shakespeare-js.
|
||||
|
@ -21,7 +21,7 @@ git-annex (3.20130115) UNRELEASED; urgency=low
|
|||
* fsck: Detect and fix consistency errors in direct mode mapping files.
|
||||
* Avoid filename encoding errors when writing direct mode mappings.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 14 Jan 2013 18:35:01 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 20 Jan 2013 16:33:18 -0400
|
||||
|
||||
git-annex (3.20130114) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
## version 3.20130107 and 3.20130114
|
||||
## 3.20130122
|
||||
|
||||
This is primarily a bugfix release.
|
||||
|
||||
## version 3.20130107, 3.20130114
|
||||
|
||||
These are bugfix releases.
|
||||
|
||||
|
|
|
@ -126,3 +126,26 @@ Note that if you want to archive multiple copies (not a bad idea!),
|
|||
you should instead configure all your archive repositories with a
|
||||
version of the above preferred content expression with a larger
|
||||
number of copies.
|
||||
|
||||
### source
|
||||
|
||||
Use for repositories where files are often added, but that do not need to
|
||||
retain files for local use. For example, a repository on a camera, where
|
||||
it's desirable to remove photos as soon as they're transferred elsewhere.
|
||||
|
||||
The preferred content expression for these causes them to only retain
|
||||
data until a copy has been sent to some other repository.
|
||||
|
||||
`not (copies=1)`
|
||||
|
||||
### manual
|
||||
|
||||
This gives you full manual control over what content is stored in the
|
||||
repository. This allows using the [[assistant]] without it trying to keep a
|
||||
local copy of every file. Instead, you can manually run `git annex get`,
|
||||
`git annex drop`, etc to manage content.
|
||||
|
||||
Only content that is present is preferred. Content in "archive"
|
||||
directories is never preferred.
|
||||
|
||||
`present and exclude=archive/*`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Name: git-annex
|
||||
Version: 3.20130114
|
||||
Version: 3.20130121
|
||||
Cabal-Version: >= 1.8
|
||||
License: GPL
|
||||
Maintainer: Joey Hess <joey@kitenet.net>
|
||||
|
|
|
@ -32,7 +32,17 @@
|
|||
When you copy or move a file out of an "archive" folder, it'll be #
|
||||
retrieved from the archive repository.
|
||||
<p>
|
||||
Finally, the <b>small archive repositories</b> are like other archive #
|
||||
The <b>small archive repositories</b> are like other archive #
|
||||
repositories, but smaller. While archive repositories normally accumulate #
|
||||
every file they can, small archive repositories only accumulate files #
|
||||
once you put them in an "archive" directory.
|
||||
<p>
|
||||
Sometimes useful for devices like cameras are the #
|
||||
<b>source repositories</b>. Repositories in this group only retain #
|
||||
files until they can be moved to some other repository, like a client #
|
||||
or transfer repository.
|
||||
<p>
|
||||
Finally, repositories can be configured to be <b>manual</b>. This #
|
||||
prevents content being automatically synced to the repository, but #
|
||||
you can use command-line tools like `git annex get` and `git annex drop` #
|
||||
to control what content is present.
|
||||
|
|
Loading…
Reference in a new issue