From 8a8380f1b7c264897b01a7ac67b502aee34547c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Dec 2012 14:10:07 -0400 Subject: [PATCH] use sync command merge engine in assistant To handle direct mode merging. --- Assistant/Threads/Merger.hs | 5 ++--- Command/Sync.hs | 2 +- doc/design/assistant/desymlink.mdwn | 6 ++++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 105f0cc9f6..c581f8087d 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -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 diff --git a/Command/Sync.hs b/Command/Sync.hs index e70524ee3f..f7241ce82b 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -1,7 +1,7 @@ {- git-annex command - - - Copyright 2011 Joey Hess - Copyright 2011 Joachim Breitner + - Copyright 2011,2012 Joey Hess - - Licensed under the GNU GPL version 3 or higher. -} diff --git a/doc/design/assistant/desymlink.mdwn b/doc/design/assistant/desymlink.mdwn index f2ba914bcf..45229f3f31 100644 --- a/doc/design/assistant/desymlink.mdwn +++ b/doc/design/assistant/desymlink.mdwn @@ -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