fix call to warnExportImportConflict
That needs a Remote that has the right export/import set up, not the input Remote, which does not yet.
This commit is contained in:
parent
a4451ac391
commit
77aedbef8b
1 changed files with 14 additions and 6 deletions
|
@ -104,11 +104,7 @@ adjustExportImport :: Remote -> RemoteStateHandle -> Annex Remote
|
||||||
adjustExportImport r rs = do
|
adjustExportImport r rs = do
|
||||||
isexport <- pure (exportTree (config r)) <&&> isExportSupported r
|
isexport <- pure (exportTree (config r)) <&&> isExportSupported r
|
||||||
isimport <- pure (importTree (config r)) <&&> isImportSupported r
|
isimport <- pure (importTree (config r)) <&&> isImportSupported r
|
||||||
let normal = not isexport && not isimport
|
let r' = r
|
||||||
let iskeyvaluestore = normal || appendonly r
|
|
||||||
dbv <- prepdbv
|
|
||||||
ciddbv <- prepciddb
|
|
||||||
return $ r
|
|
||||||
{ remotetype = (remotetype r)
|
{ remotetype = (remotetype r)
|
||||||
{ exportSupported = if isexport
|
{ exportSupported = if isexport
|
||||||
then exportSupported (remotetype r)
|
then exportSupported (remotetype r)
|
||||||
|
@ -117,7 +113,19 @@ adjustExportImport r rs = do
|
||||||
then importSupported (remotetype r)
|
then importSupported (remotetype r)
|
||||||
else importUnsupported
|
else importUnsupported
|
||||||
}
|
}
|
||||||
, exportActions = if isexport
|
}
|
||||||
|
if not isexport && not isimport
|
||||||
|
then return r'
|
||||||
|
else adjustExportImport' isexport isimport r' rs
|
||||||
|
|
||||||
|
adjustExportImport' :: Bool -> Bool -> Remote -> RemoteStateHandle -> Annex Remote
|
||||||
|
adjustExportImport' isexport isimport r rs = do
|
||||||
|
dbv <- prepdbv
|
||||||
|
ciddbv <- prepciddb
|
||||||
|
let normal = not isexport && not isimport
|
||||||
|
let iskeyvaluestore = normal || appendonly r
|
||||||
|
return $ r
|
||||||
|
{ exportActions = if isexport
|
||||||
then if isimport
|
then if isimport
|
||||||
then exportActionsForImport dbv ciddbv (exportActions r)
|
then exportActionsForImport dbv ciddbv (exportActions r)
|
||||||
else exportActions r
|
else exportActions r
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue