drop --from: When local repository is untrusted, its copy of a file does not count.
This commit is contained in:
parent
7f2ef57601
commit
584ab89ea2
3 changed files with 13 additions and 3 deletions
|
@ -78,12 +78,18 @@ performRemote :: Key -> AssociatedFile -> NumCopies -> Remote -> CommandPerform
|
||||||
performRemote key afile numcopies remote = lockContent key $ do
|
performRemote key afile numcopies remote = lockContent key $ do
|
||||||
-- Filter the remote it's being dropped from out of the lists of
|
-- Filter the remote it's being dropped from out of the lists of
|
||||||
-- places assumed to have the key, and places to check.
|
-- places assumed to have the key, and places to check.
|
||||||
-- When the local repo has the key, that's one additional copy.
|
-- When the local repo has the key, that's one additional copy,
|
||||||
|
-- as long asthe local repo is not untrusted.
|
||||||
(remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key
|
(remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key
|
||||||
present <- inAnnex key
|
present <- inAnnex key
|
||||||
u <- getUUID
|
u <- getUUID
|
||||||
let have = filter (/= uuid) $
|
trusteduuids' <- if present
|
||||||
if present then u:trusteduuids else trusteduuids
|
then ifM ((<= SemiTrusted) <$> lookupTrust u)
|
||||||
|
( pure (u:trusteduuids)
|
||||||
|
, pure trusteduuids
|
||||||
|
)
|
||||||
|
else pure trusteduuids
|
||||||
|
let have = filter (/= uuid) trusteduuids'
|
||||||
untrusteduuids <- trustGet UnTrusted
|
untrusteduuids <- trustGet UnTrusted
|
||||||
let tocheck = filter (/= remote) $
|
let tocheck = filter (/= remote) $
|
||||||
Remote.remotesWithoutUUID remotes (have++untrusteduuids)
|
Remote.remotesWithoutUUID remotes (have++untrusteduuids)
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -21,6 +21,8 @@ git-annex (5.20140413) UNRELEASED; urgency=medium
|
||||||
the configuration of a previously known repository.
|
the configuration of a previously known repository.
|
||||||
Useful if a repository got deleted and you want
|
Useful if a repository got deleted and you want
|
||||||
to clone it back the way it was.
|
to clone it back the way it was.
|
||||||
|
* drop --from: When local repository is untrusted, its copy of a file does
|
||||||
|
not count.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Fri, 11 Apr 2014 21:33:35 -0400
|
-- Joey Hess <joeyh@debian.org> Fri, 11 Apr 2014 21:33:35 -0400
|
||||||
|
|
||||||
|
|
|
@ -42,3 +42,5 @@ index 269c4c2..09ea99a 100644
|
||||||
let tocheck = filter (/= remote) $
|
let tocheck = filter (/= remote) $
|
||||||
Remote.remotesWithoutUUID remotes (have++untrusteduuids)
|
Remote.remotesWithoutUUID remotes (have++untrusteduuids)
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue