support required groupwanted
When the required content is set to "groupwanted", use whatever expression has been set in groupwanted as the required content of the repo, similar to how setting required content to "standard" already worked.
This commit is contained in:
parent
45d884db9b
commit
57b89c635f
4 changed files with 33 additions and 2 deletions
|
@ -37,6 +37,10 @@ git-annex (8.20200331) UNRELEASED; urgency=medium
|
||||||
* addurl: When run with --fast on an url that
|
* addurl: When run with --fast on an url that
|
||||||
annex.security.allowed-ip-addresses prevents accessing, display
|
annex.security.allowed-ip-addresses prevents accessing, display
|
||||||
a more useful message.
|
a more useful message.
|
||||||
|
* When the required content is set to "groupwanted", use whatever
|
||||||
|
expression has been set in groupwanted as the required content of the
|
||||||
|
repo, similar to how setting required content to "standard" already
|
||||||
|
worked.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 30 Mar 2020 15:58:34 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 30 Mar 2020 15:58:34 -0400
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,9 @@ preferredRequiredMapsLoad' mktokens = do
|
||||||
in simpleMap
|
in simpleMap
|
||||||
. parseLogOldWithUUID (\u -> mk u . decodeBS <$> A.takeByteString)
|
. parseLogOldWithUUID (\u -> mk u . decodeBS <$> A.takeByteString)
|
||||||
<$> Annex.Branch.get l
|
<$> Annex.Branch.get l
|
||||||
pc <- genmap preferredContentLog =<< groupPreferredContentMapRaw
|
gm <- groupPreferredContentMapRaw
|
||||||
rc <- genmap requiredContentLog M.empty
|
pc <- genmap preferredContentLog gm
|
||||||
|
rc <- genmap requiredContentLog gm
|
||||||
-- Required content is implicitly also preferred content, so combine.
|
-- Required content is implicitly also preferred content, so combine.
|
||||||
let pc' = M.unionWith combiner pc rc
|
let pc' = M.unionWith combiner pc rc
|
||||||
return (pc', rc)
|
return (pc', rc)
|
||||||
|
|
|
@ -131,3 +131,5 @@ ok
|
||||||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||||
|
|
||||||
I had, some time ago I synced my phone with it. I stopped because of the painful crippled file system there, and the annex was so large that the phone was slow. But I always wanted to restart annexing, to archive and partially checkout my libraries, and maybe do the phone sync right (probably via a special remote)! It seems to be THE tool as soon as a repo is split over multiple disks.
|
I had, some time ago I synced my phone with it. I stopped because of the painful crippled file system there, and the annex was so large that the phone was slow. But I always wanted to restart annexing, to archive and partially checkout my libraries, and maybe do the phone sync right (probably via a special remote)! It seems to be THE tool as soon as a repo is split over multiple disks.
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2020-04-28T17:06:39Z"
|
||||||
|
content="""
|
||||||
|
This comes down to this part of preferredRequiredMapsLoad:
|
||||||
|
|
||||||
|
pc <- genmap preferredContentLog =<< groupPreferredContentMapRaw
|
||||||
|
rc <- genmap requiredContentLog M.empty
|
||||||
|
|
||||||
|
So for required content, it does not use the group preferred content map.
|
||||||
|
|
||||||
|
Should it also use the groupwanted values for required content in this case?
|
||||||
|
It kind of makes sense, but I do wonder if someone might have a group that they
|
||||||
|
want to use one expression for its preferred content (groupwanted)
|
||||||
|
and a different expression for its required content ("grouprequired").
|
||||||
|
|
||||||
|
OTOH, I suppose that allowing for the former case now does not prevent
|
||||||
|
later adding support for the latter.
|
||||||
|
|
||||||
|
(Also, setting required to "standard" already works, so that's a precident.)
|
||||||
|
|
||||||
|
Confirmed that passing the map does fix the behavior, so I'm doing that.
|
||||||
|
"""]]
|
Loading…
Reference in a new issue