diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-14 16:01:16 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-14 16:08:21 -0400 |
commit | dddad6181f3430f47656ff9e143cf1a0a9baddda (patch) | |
tree | 70f4d35943f768ac599064a3c51731426a31d9f0 | |
parent | a4fe8365f3745033a307817e754f132357af47f7 (diff) |
handle transfer repository bootstrapping
When there's just 1 client repo, and a transfer repo is created, its
preferred content will now make it prefer all content in the client,
even though there's no other client yet to transfer it to. Presumably,
another client will be created eventually. It might even already exist,
and the transfer repo will be used to connect up with it.
-rw-r--r-- | Types/StandardGroups.hs | 2 | ||||
-rw-r--r-- | doc/preferred_content.mdwn | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs index 32e2cb3af..aeae200c2 100644 --- a/Types/StandardGroups.hs +++ b/Types/StandardGroups.hs @@ -32,6 +32,6 @@ descStandardGroup BackupGroup = "backup: collects all files" {- See doc/preferred_content.mdwn for explanations of these expressions. -} preferredContent :: StandardGroup -> String preferredContent ClientGroup = "exclude=*/archive/*" -preferredContent TransferGroup = "not inallgroup=client and " ++ preferredContent ClientGroup +preferredContent TransferGroup = "not (inallgroup=client or not copies=client:2) and " ++ preferredContent ClientGroup preferredContent ArchiveGroup = "not copies=archive:1" preferredContent BackupGroup = "" -- all content is preferred diff --git a/doc/preferred_content.mdwn b/doc/preferred_content.mdwn index c130a07e6..6205eb4c9 100644 --- a/doc/preferred_content.mdwn +++ b/doc/preferred_content.mdwn @@ -61,7 +61,13 @@ USB drive used in a sneakernet. The preferred content expression for these causes them to get and retain data until all clients have a copy. -`not inallgroup=client and exclude=*/archive/*` +`not (inallgroup=client or not copies=client:2) and exclude=*/archive/*` + +The "not copies=client:2" part of the above handles the case where +there is only one client repository. It makes a transfer repository +speculatively prefer content in this case, even though it as of yet +has nowhere to transfer it to. Presumably, another client repository +will be added later. ### archive |