Merge branch 'master' into desymlink
This commit is contained in:
commit
ffdd08fd2e
33 changed files with 97 additions and 100 deletions
|
@ -79,7 +79,7 @@ performRemote key numcopies remote = lockContent key $ do
|
|||
stopUnless (canDropKey key numcopies have tocheck [uuid]) $ do
|
||||
ok <- Remote.removeKey remote key
|
||||
next $ cleanupRemote key remote ok
|
||||
where
|
||||
where
|
||||
uuid = Remote.uuid remote
|
||||
|
||||
cleanupLocal :: Key -> CommandCleanup
|
||||
|
|
|
@ -206,7 +206,7 @@ fixLink key file = do
|
|||
return True
|
||||
|
||||
{- Checks that the location log reflects the current status of the key,
|
||||
in this repository only. -}
|
||||
- in this repository only. -}
|
||||
verifyLocationLog :: Key -> String -> Annex Bool
|
||||
verifyLocationLog key desc = do
|
||||
present <- inAnnex key
|
||||
|
|
|
@ -33,7 +33,7 @@ perform srcfile destfile = do
|
|||
unlessM (Annex.getState Annex.force) $
|
||||
error $ "not overwriting existing " ++ destfile ++
|
||||
" (use --force to override)"
|
||||
|
||||
|
||||
liftIO $ createDirectoryIfMissing True (parentDir destfile)
|
||||
liftIO $ moveFile srcfile destfile
|
||||
Command.Add.perform destfile
|
||||
|
|
|
@ -52,7 +52,7 @@ cleanup :: UUID -> String -> R.RemoteConfig -> CommandCleanup
|
|||
cleanup u name c = do
|
||||
describeUUID u name
|
||||
Logs.Remote.configSet u c
|
||||
return True
|
||||
return True
|
||||
|
||||
{- Look up existing remote's UUID and config by name, or generate a new one -}
|
||||
findByName :: String -> Annex (UUID, R.RemoteConfig)
|
||||
|
|
|
@ -19,7 +19,7 @@ import Annex.Content
|
|||
|
||||
def :: [Command]
|
||||
def = [addCheck check $ command "uninit" paramPaths seek
|
||||
"de-initialize git-annex and clean out repository"]
|
||||
"de-initialize git-annex and clean out repository"]
|
||||
|
||||
check :: Annex ()
|
||||
check = do
|
||||
|
|
|
@ -39,12 +39,12 @@ perform dest key = do
|
|||
tmpdest <- fromRepo $ gitAnnexTmpLocation key
|
||||
liftIO $ createDirectoryIfMissing True (parentDir tmpdest)
|
||||
showAction "copying"
|
||||
ok <- liftIO $ copyFileExternal src tmpdest
|
||||
if ok
|
||||
then do
|
||||
ifM (liftIO $ copyFileExternal src tmpdest)
|
||||
( do
|
||||
liftIO $ do
|
||||
removeFile dest
|
||||
moveFile tmpdest dest
|
||||
thawContent dest
|
||||
next $ return True
|
||||
else error "copy failed!"
|
||||
, error "copy failed!"
|
||||
)
|
||||
|
|
|
@ -30,7 +30,7 @@ import Control.Concurrent.STM
|
|||
|
||||
def :: [Command]
|
||||
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
|
||||
command "webapp" paramNothing seek "launch webapp"]
|
||||
command "webapp" paramNothing seek "launch webapp"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
seek = [withNothing start]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue