diff --git a/src/Darcs/Repository.hs b/src/Darcs/Repository.hs index f68a77a..3c5af65 100644 --- a/src/Darcs/Repository.hs +++ b/src/Darcs/Repository.hs @@ -302,19 +302,35 @@ removeMetaFiles :: IO () removeMetaFiles = mapM_ (removeFile . (darcsdir )) . filter ("meta-" `isPrefixOf`) =<< getDirectoryContents darcsdir +#if MIN_VERSION_tar(0,4,0) +unpackBasic :: Cache -> Tar.Entries Tar.FormatError -> IO () +#else unpackBasic :: Cache -> Tar.Entries -> IO () +#endif unpackBasic c x = do withControlMVar $ \mv -> unpackTar c (basicMetaHandler c mv) x removeMetaFiles +#if MIN_VERSION_tar(0,4,0) +unpackPatches :: Cache -> [String] -> Tar.Entries Tar.FormatError -> IO () +#else unpackPatches :: Cache -> [String] -> Tar.Entries -> IO () +#endif unpackPatches c ps x = do withControlMVar $ \mv -> unpackTar c (patchesMetaHandler c ps mv) x removeMetaFiles +#if MIN_VERSION_tar(0,4,0) +unpackTar :: Cache -> IO () -> Tar.Entries Tar.FormatError -> IO () +#else unpackTar :: Cache -> IO () -> Tar.Entries -> IO () +#endif unpackTar _ _ Tar.Done = return () +#if MIN_VERSION_tar(0,4,0) +unpackTar _ _ (Tar.Fail e)= fail (show e) +#else unpackTar _ _ (Tar.Fail e)= fail e +#endif unpackTar c mh (Tar.Next x xs) = case Tar.entryContent x of Tar.NormalFile x' _ -> do let p = Tar.entryPath x