Avoid repeated location log commits when a remote is receiving files.
Done by adding a oneshot mode, in which location log changes are written to the journal, but not committed. Taking advantage of git-annex's existing ability to recover in this situation. This is used by git-annex-shell and other places where changes are made to a remote's location log.
This commit is contained in:
parent
303666965a
commit
b81d662cbf
9 changed files with 28 additions and 17 deletions
|
@ -28,7 +28,7 @@ start key = do
|
|||
if ok
|
||||
then do
|
||||
-- forcibly quit after receiving one key,
|
||||
-- and shutdown cleanly so queued git commands run
|
||||
_ <- shutdown
|
||||
-- and shutdown cleanly
|
||||
_ <- shutdown True
|
||||
liftIO exitSuccess
|
||||
else liftIO exitFailure
|
||||
|
|
|
@ -57,7 +57,7 @@ cleanup = do
|
|||
mapM_ removeAnnex =<< getKeysPresent
|
||||
liftIO $ removeDirectoryRecursive annexdir
|
||||
-- avoid normal shutdown
|
||||
saveState
|
||||
saveState False
|
||||
inRepo $ Git.Command.run "branch"
|
||||
[Param "-D", Param $ show Annex.Branch.name]
|
||||
liftIO exitSuccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue