blob: 9bd2c26cd6045f1e9b4182cc0ecbbdd8a583154c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
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
|