summaryrefslogtreecommitdiff
path: root/p/darcs-monitor/debian/patches/haxml-2.22-compat
blob: 028bf37fbb734339abe5b62eaba56353d0a4db45 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: HaXml 2.22 compatibilitiy
Author: Joachim Breitner <nomeata@debian.org>
Bug-Debian: http://bugs.debian.org/629784

Index: darcs-monitor-0.4.2/darcs-monitor.cabal
===================================================================
--- darcs-monitor-0.4.2.orig/darcs-monitor.cabal	2015-06-11 10:37:49.439871961 +0200
+++ darcs-monitor-0.4.2/darcs-monitor.cabal	2015-06-11 10:38:04.772409588 +0200
@@ -28,7 +28,7 @@
   description: Choose the new smaller, split-up base package.
 
 Executable darcs-monitor
-  Build-Depends: mtl, HaXml == 1.20.*
+  Build-Depends: mtl, HaXml >= 1.25 && <= 1.26
   if flag(splitBase)
     Build-Depends: base >=3 && < 5, containers, directory, process
   else
Index: darcs-monitor-0.4.2/darcs-monitor.hs
===================================================================
--- darcs-monitor-0.4.2.orig/darcs-monitor.hs	2015-06-11 10:37:49.439871961 +0200
+++ darcs-monitor-0.4.2/darcs-monitor.hs	2015-06-11 10:37:49.435871820 +0200
@@ -194,15 +194,15 @@
   liftIO $ createDirectoryIfMissing True (repo++dir)
   seenPatches <- readSeenPatches repo
   xml <- invokeDarcs ["changes", "--reverse", "--repo="++repo,"--xml-output","-a"]
-  let Document _ _ (Elem "changelog" _ content) _ = xmlParse repo xml 
+  let Document _ _ (Elem (N "changelog") _ content) _ = xmlParse repo xml 
   let patches
         = filter (\c -> case c of CElem _e _ -> True ; _ -> False) content
-  spl <- forM patches $ \ (CElem (Elem "patch" attrs content_) _) -> 
-      do let author = getAttr "author" attrs
-             localDate = getAttr "local_date" attrs
-             hash = getAttr "hash" attrs
-             name = getElem "name" content_
-             comment = getElem "comment" content_
+  spl <- forM patches $ \ (CElem (Elem (N "patch") attrs content_) _) -> 
+      do let author = getAttr (N "author") attrs
+             localDate = getAttr (N "local_date") attrs
+             hash = getAttr (N "hash") attrs
+             name = getElem (N "name") content_
+             comment = getElem (N "comment") content_
              (authorName, authorEmail) = parseAuthor author
              dt = PatchData { patchRepo = repo
                             , patchAuthor = authorName
@@ -251,7 +251,7 @@
                                      massage ss
           massage [] = id
 
-getElem :: Name -> [Content Posn] -> String
+getElem :: QName -> [Content Posn] -> String
 getElem name (CElem (Elem name' _ content) _ : _rest)
     | name == name'     = getContent content ""
 getElem name (_ : rest) = getElem name rest