make direct mode merge cleanup more robust
If the cleanup of a single file fails for some reason, continue to clean up other files. This could happen because of a race. The merge pulls in a change to a file, which gets changed locally at the same time.
This commit is contained in:
parent
bf86b5ca16
commit
5eeea0fac9
1 changed files with 5 additions and 2 deletions
|
@ -27,6 +27,7 @@ import Utility.InodeCache
|
||||||
import Utility.CopyFile
|
import Utility.CopyFile
|
||||||
import Annex.Perms
|
import Annex.Perms
|
||||||
import Annex.ReplaceFile
|
import Annex.ReplaceFile
|
||||||
|
import Annex.Exception
|
||||||
|
|
||||||
{- Uses git ls-files to find files that need to be committed, and stages
|
{- Uses git ls-files to find files that need to be committed, and stages
|
||||||
- them into the index. Returns True if some changes were staged. -}
|
- them into the index. Returns True if some changes were staged. -}
|
||||||
|
@ -139,7 +140,9 @@ mergeDirectCleanup d oldsha newsha = do
|
||||||
liftIO $ removeDirectoryRecursive d
|
liftIO $ removeDirectoryRecursive d
|
||||||
where
|
where
|
||||||
updated item = do
|
updated item = do
|
||||||
|
void $ tryAnnex $
|
||||||
go DiffTree.srcsha DiffTree.srcmode moveout moveout_raw
|
go DiffTree.srcsha DiffTree.srcmode moveout moveout_raw
|
||||||
|
void $ tryAnnex $
|
||||||
go DiffTree.dstsha DiffTree.dstmode movein movein_raw
|
go DiffTree.dstsha DiffTree.dstmode movein movein_raw
|
||||||
where
|
where
|
||||||
go getsha getmode a araw
|
go getsha getmode a araw
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue