diff options
-rw-r--r-- | Command/Export.hs | 11 | ||||
-rw-r--r-- | Logs/Export.hs | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/Command/Export.hs b/Command/Export.hs index 52355e69d..8f1a6f149 100644 --- a/Command/Export.hs +++ b/Command/Export.hs @@ -10,6 +10,7 @@ module Command.Export where import Command +import qualified Annex import qualified Git import qualified Git.DiffTree import qualified Git.LsTree @@ -144,10 +145,12 @@ seek o = do -- Waiting until now to record the export guarantees that, -- if this export is interrupted, there are no files left over -- from a previous export, that are not part of this export. - recordExport (uuid r) $ ExportChange - { oldTreeish = map exportedTreeish old - , newTreeish = new - } + c <- Annex.getState Annex.errcounter + when (c == 0) $ + recordExport (uuid r) $ ExportChange + { oldTreeish = map exportedTreeish old + , newTreeish = new + } -- Export everything that is not yet exported. (l, cleanup') <- inRepo $ Git.LsTree.lsTree new diff --git a/Logs/Export.hs b/Logs/Export.hs index 3ba77cd24..2327d70d1 100644 --- a/Logs/Export.hs +++ b/Logs/Export.hs @@ -84,7 +84,7 @@ recordExportBeginning remoteuuid newtree = do . M.lookup u . simpleMap . parseLogNew parseExportLog <$> Annex.Branch.get exportLog - let new = old { incompleteExportedTreeish = newtree:incompleteExportedTreeish old } + let new = old { incompleteExportedTreeish = nub (newtree:incompleteExportedTreeish old) } Annex.Branch.change exportLog $ showLogNew formatExportLog . changeLog c u (ExportLog new remoteuuid) |