diff --git a/Annex/Export.hs b/Annex/Export.hs index 08a1630bf0..a72d5d0dbb 100644 --- a/Annex/Export.hs +++ b/Annex/Export.hs @@ -42,8 +42,12 @@ exportKey sha = mk <$> catKey sha , keyChunkNum = Nothing } -warnExportConflict :: Remote -> Annex () -warnExportConflict r = toplevelWarning True $ - "Export conflict detected. Different trees have been exported to " ++ - Remote.name r ++ - ". Use git-annex export to resolve this conflict." +warnExportImportConflict :: Remote -> Annex () +warnExportImportConflict r = do + ops <- Remote.isImportSupported r >>= return . \case + True -> "exported to and/or imported from" + False -> "exported to" + toplevelWarning True $ + "Conflict detected. Different trees have been " ++ ops ++ + Remote.name r ++ + ". Use git-annex export to resolve this conflict." diff --git a/Command/Export.hs b/Command/Export.hs index 1bbc449102..b734b3d4c0 100644 --- a/Command/Export.hs +++ b/Command/Export.hs @@ -156,7 +156,7 @@ changeExport r db new = do startMoveFromTempName r db ek newf _ -> stop ts -> do - warning "Export conflict detected. Different trees have been exported to the same special remote. Resolving.." + warning "Resolving export conflict.." forM_ ts $ \oldtreesha -> do -- Unexport both the srcsha and the dstsha, -- because the wrong content may have diff --git a/Command/Sync.hs b/Command/Sync.hs index 6c630e3fcd..49661550bb 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -755,7 +755,7 @@ seekExportContent o rs (currbranch, _) = or <$> forM rs go fillexport _ _ [] _ = return False fillexport r db (t:[]) mtbcommitsha = Command.Export.fillExport r db t mtbcommitsha fillexport r _ _ _ = do - warnExportConflict r + warnExportImportConflict r return False cleanupLocal :: CurrBranch -> CommandStart