use sync command merge engine in assistant

To handle direct mode merging.
This commit is contained in:
Joey Hess 2012-12-25 14:10:07 -04:00
parent 9fcfcab485
commit 8a8380f1b7
3 changed files with 9 additions and 4 deletions

View file

@ -14,8 +14,8 @@ import Utility.DirWatcher
import Utility.Types.DirWatcher
import qualified Annex.Branch
import qualified Git
import qualified Git.Merge
import qualified Git.Branch
import qualified Command.Sync
thisThread :: ThreadName
thisThread = "Merger"
@ -80,8 +80,7 @@ onAdd file
[ "merging", show changedbranch
, "into", show current
]
void $ liftAnnex $ inRepo $
Git.Merge.mergeNonInteractive changedbranch
void $ liftAnnex $ Command.Sync.mergeFrom changedbranch
mergecurrent _ = noop
equivBranches :: Git.Ref -> Git.Ref -> Bool

View file

@ -1,7 +1,7 @@
{- git-annex command
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
- Copyright 2011 Joachim Breitner <mail@joachim-breitner.de>
- Copyright 2011,2012 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}

View file

@ -87,6 +87,12 @@ is converted to a real file when it becomes present.
* Deal with files changing as they're being transferred from a direct mode
repository to another git repository. The remote repo currently will
accept the bad data and update the location log to say it has the key.
* When the assistant adds a modified direct mode file, it leaves behind
an associated files mapping to the file for the old key as well. That
needs to be deleted (sync deletes it in the similar situation).
* kqueue does not deliver an event when an existing file is modified;
need a different way to detect file modifications (possibly an OSX specific
interface?)
## done