fix direct mode switch permissions problem
Similar to how a similar problem with indirect was earlier fixed.
This commit is contained in:
parent
2ba975bf3d
commit
7f7dcd315b
3 changed files with 17 additions and 3 deletions
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
module Command.Direct where
|
module Command.Direct where
|
||||||
|
|
||||||
|
import Control.Exception.Extensible
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
import Command
|
import Command
|
||||||
import qualified Git
|
import qualified Git
|
||||||
|
@ -15,6 +17,7 @@ import qualified Git.LsFiles
|
||||||
import Config
|
import Config
|
||||||
import Annex.Direct
|
import Annex.Direct
|
||||||
import Annex.Version
|
import Annex.Version
|
||||||
|
import Annex.Exception
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [notBareRepo $ noDaemonRunning $
|
def = [notBareRepo $ noDaemonRunning $
|
||||||
|
@ -51,10 +54,17 @@ perform = do
|
||||||
Nothing -> noop
|
Nothing -> noop
|
||||||
Just a -> do
|
Just a -> do
|
||||||
showStart "direct" f
|
showStart "direct" f
|
||||||
a
|
r <- tryAnnex a
|
||||||
showEndOk
|
case r of
|
||||||
|
Left e -> warnlocked e
|
||||||
|
Right _ -> showEndOk
|
||||||
return Nothing
|
return Nothing
|
||||||
|
|
||||||
|
warnlocked :: SomeException -> Annex ()
|
||||||
|
warnlocked e = do
|
||||||
|
warning $ show e
|
||||||
|
warning "leaving this file as-is; correct this problem and run git annex fsck on it"
|
||||||
|
|
||||||
cleanup :: CommandCleanup
|
cleanup :: CommandCleanup
|
||||||
cleanup = do
|
cleanup = do
|
||||||
showStart "direct" ""
|
showStart "direct" ""
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -13,7 +13,7 @@ git-annex (4.20130921) UNRELEASED; urgency=low
|
||||||
* assistant: Clear the list of failed transfers when doing a full transfer
|
* assistant: Clear the list of failed transfers when doing a full transfer
|
||||||
scan. This prevents repeated retries to download files that are not
|
scan. This prevents repeated retries to download files that are not
|
||||||
available, or are not referenced by the current git tree.
|
available, or are not referenced by the current git tree.
|
||||||
* indirect: Better behavior when a file in direct mode is not owned by
|
* indirect, direct: Better behavior when a file is not owned by
|
||||||
the user running the conversion.
|
the user running the conversion.
|
||||||
* add, import, assistant: Better preserve the mtime of symlinks,
|
* add, import, assistant: Better preserve the mtime of symlinks,
|
||||||
when when adding content that gets deduplicated.
|
when when adding content that gets deduplicated.
|
||||||
|
|
|
@ -75,3 +75,7 @@ failed
|
||||||
git-annex: copy: 1 failed
|
git-annex: copy: 1 failed
|
||||||
camaar%
|
camaar%
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> Put in a fix that works, although perhaps not ideal as I do not
|
||||||
|
> understand how the repo got into the original problem state. [[done]]
|
||||||
|
> --[[Joey]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue