update warnExportImportConflict for import-only remotes
This commit is contained in:
parent
77aedbef8b
commit
400bdb48db
1 changed files with 12 additions and 7 deletions
|
@ -43,10 +43,15 @@ exportKey sha = mk <$> catKey sha
|
||||||
|
|
||||||
warnExportImportConflict :: Remote -> Annex ()
|
warnExportImportConflict :: Remote -> Annex ()
|
||||||
warnExportImportConflict r = do
|
warnExportImportConflict r = do
|
||||||
ops <- Remote.isImportSupported r >>= return . \case
|
isimport <- Remote.isImportSupported r
|
||||||
True -> "exported to and/or imported from"
|
isexport <- Remote.isExportSupported r
|
||||||
False -> "exported to"
|
let (ops, resolvcmd) = case (isexport, isimport) of
|
||||||
toplevelWarning True $
|
(False, True) -> ("imported from", "git-annex import")
|
||||||
"Conflict detected. Different trees have been " ++ ops ++ " " ++
|
(True, False) -> ("exported to", "git-annex export")
|
||||||
Remote.name r ++
|
_ -> ("exported to and/or imported from", "git-annex export")
|
||||||
". Use git-annex export to resolve this conflict."
|
toplevelWarning True $ unwords
|
||||||
|
[ "Conflict detected. Different trees have been"
|
||||||
|
, ops, Remote.name r ++ ". Use"
|
||||||
|
, resolvcmd
|
||||||
|
, "to resolve this conflict."
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue