Ticket #4407: upd-mercurial-to-1.1.2.txt

File upd-mercurial-to-1.1.2.txt, 14.5 KB (added by pmeerw@…, 9 years ago)

patch (local svn diff) to update to 1.1.2

Line 
1Index: mercurial/patches/001-no_bzip2.patch
2===================================================================
3--- mercurial/patches/001-no_bzip2.patch        (revision 13787)
4+++ mercurial/patches/001-no_bzip2.patch        (working copy)
5@@ -1,208 +1,124 @@
6-diff -rc mercurial-1.0.orig/mercurial/archival.py mercurial-1.0/mercurial/archival.py
7-*** mercurial-1.0.orig/mercurial/archival.py   2008-03-25 00:05:20.000000000 +0100
8---- mercurial-1.0/mercurial/archival.py        2008-04-13 02:22:47.000000000 +0200
9-***************
10-*** 64,71 ****
11-                  self.fileobj.write(fname + '\000')
12
13-      def __init__(self, dest, prefix, mtime, kind=''):
14-!         self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.bz2', '.tar.gz',
15-!                                                 '.tgz', '.tbz2'])
16-          self.mtime = mtime
17
18-          def taropen(name, mode, fileobj=None):
19---- 64,71 ----
20-                  self.fileobj.write(fname + '\000')
21
22-      def __init__(self, dest, prefix, mtime, kind=''):
23-!         self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.gz',
24-!                                                 '.tgz'])
25-          self.mtime = mtime
26
27-          def taropen(name, mode, fileobj=None):
28-***************
29-*** 178,184 ****
30-  archivers = {
31-      'files': fileit,
32-      'tar': tarit,
33--     'tbz2': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'bz2'),
34-      'tgz': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'gz'),
35-      'uzip': lambda name, prefix, mtime: zipit(name, prefix, mtime, False),
36-      'zip': zipit,
37---- 178,183 ----
38-diff -rc mercurial-1.0.orig/mercurial/bundlerepo.py mercurial-1.0/mercurial/bundlerepo.py
39-*** mercurial-1.0.orig/mercurial/bundlerepo.py 2008-03-25 00:05:20.000000000 +0100
40---- mercurial-1.0/mercurial/bundlerepo.py      2008-04-13 02:23:54.000000000 +0200
41-***************
42-*** 12,18 ****
43
44-  from node import hex, nullid, short
45-  from i18n import _
46-! import changegroup, util, os, struct, bz2, tempfile, shutil, mdiff
47-  import repo, localrepo, changelog, manifest, filelog, revlog
48
49-  class bundlerevlog(revlog.revlog):
50---- 12,18 ----
51
52-  from node import hex, nullid, short
53-  from i18n import _
54-! import changegroup, util, os, struct, tempfile, shutil, mdiff
55-  import repo, localrepo, changelog, manifest, filelog, revlog
56
57-  class bundlerevlog(revlog.revlog):
58-***************
59-*** 173,201 ****
60-              raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename)
61-          elif not header.startswith("HG10"):
62-              raise util.Abort(_("%s: unknown bundle version") % bundlename)
63--         elif header == "HG10BZ":
64--             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
65--                                             suffix=".hg10un", dir=self.path)
66--             self.tempfile = temp
67--             fptemp = os.fdopen(fdtemp, 'wb')
68--             def generator(f):
69--                 zd = bz2.BZ2Decompressor()
70--                 zd.decompress("BZ")
71--                 for chunk in f:
72--                     yield zd.decompress(chunk)
73--             gen = generator(util.filechunkiter(self.bundlefile, 4096))
74--
75--             try:
76--                 fptemp.write("HG10UN")
77--                 for chunk in gen:
78--                     fptemp.write(chunk)
79--             finally:
80--                 fptemp.close()
81--                 self.bundlefile.close()
82--
83--             self.bundlefile = open(self.tempfile, "rb")
84--             # seek right after the header
85--             self.bundlefile.seek(6)
86-          elif header == "HG10UN":
87-              # nothing to do
88-              pass
89---- 173,178 ----
90-diff -rc mercurial-1.0.orig/mercurial/changegroup.py mercurial-1.0/mercurial/changegroup.py
91-*** mercurial-1.0.orig/mercurial/changegroup.py        2008-03-25 00:05:20.000000000 +0100
92---- mercurial-1.0/mercurial/changegroup.py     2008-04-13 02:24:40.000000000 +0200
93-***************
94-*** 8,14 ****
95-  """
96
97-  from i18n import _
98-! import struct, os, bz2, zlib, util, tempfile
99
100-  def getchunk(source):
101-      """get a chunk from a changegroup"""
102---- 8,14 ----
103-  """
104
105-  from i18n import _
106-! import struct, os, zlib, util, tempfile
107
108-  def getchunk(source):
109-      """get a chunk from a changegroup"""
110-***************
111-*** 49,60 ****
112-  bundletypes = {
113-      "": ("", nocompress),
114-      "HG10UN": ("HG10UN", nocompress),
115--     "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()),
116-      "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
117-  }
118
119-  # hgweb uses this list to communicate it's preferred type
120-! bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN']
121
122-  def writebundle(cg, filename, bundletype):
123-      """Write a bundle file and return its filename.
124---- 49,59 ----
125-  bundletypes = {
126-      "": ("", nocompress),
127-      "HG10UN": ("HG10UN", nocompress),
128-      "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
129-  }
130
131-  # hgweb uses this list to communicate it's preferred type
132-! bundlepriority = ['HG10GZ', 'HG10UN']
133
134-  def writebundle(cg, filename, bundletype):
135-      """Write a bundle file and return its filename.
136-***************
137-*** 122,133 ****
138-              zd = zlib.decompressobj()
139-              for chunk in f:
140-                  yield zd.decompress(chunk)
141--     elif header == 'HG10BZ':
142--         def generator(f):
143--             zd = bz2.BZ2Decompressor()
144--             zd.decompress("BZ")
145--             for chunk in util.filechunkiter(f, 4096):
146--                 yield zd.decompress(chunk)
147-      return util.chunkbuffer(generator(fh))
148
149-  def readbundle(fh, fname):
150---- 121,126 ----
151-diff -rc mercurial-1.0.orig/mercurial/commands.py mercurial-1.0/mercurial/commands.py
152-*** mercurial-1.0.orig/mercurial/commands.py   2008-03-25 00:05:20.000000000 +0100
153---- mercurial-1.0/mercurial/commands.py        2008-04-13 02:24:54.000000000 +0200
154-***************
155-*** 139,145 ****
156
157-      "files" (default): a directory full of files
158-      "tar": tar archive, uncompressed
159--     "tbz2": tar archive, compressed using bzip2
160-      "tgz": tar archive, compressed using gzip
161-      "uzip": zip archive, uncompressed
162-      "zip": zip archive, compressed using deflate
163---- 139,144 ----
164-diff -rc mercurial-1.0.orig/mercurial/hgweb/hgwebdir_mod.py mercurial-1.0/mercurial/hgweb/hgwebdir_mod.py
165-*** mercurial-1.0.orig/mercurial/hgweb/hgwebdir_mod.py 2008-03-25 00:05:20.000000000 +0100
166---- mercurial-1.0/mercurial/hgweb/hgwebdir_mod.py      2008-04-13 02:25:33.000000000 +0200
167-***************
168-*** 152,158 ****
169
170-          def archivelist(ui, nodeid, url):
171-              allowed = ui.configlist("web", "allow_archive", untrusted=True)
172-!             for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
173-                  if i[0] in allowed or ui.configbool("web", "allow" + i[0],
174-                                                      untrusted=True):
175-                      yield {"type" : i[0], "extension": i[1],
176---- 152,158 ----
177
178-          def archivelist(ui, nodeid, url):
179-              allowed = ui.configlist("web", "allow_archive", untrusted=True)
180-!             for i in [('zip', '.zip'), ('gz', '.tar.gz')]:
181-                  if i[0] in allowed or ui.configbool("web", "allow" + i[0],
182-                                                      untrusted=True):
183-                      yield {"type" : i[0], "extension": i[1],
184-diff -rc mercurial-1.0.orig/mercurial/hgweb/hgweb_mod.py mercurial-1.0/mercurial/hgweb/hgweb_mod.py
185-*** mercurial-1.0.orig/mercurial/hgweb/hgweb_mod.py    2008-03-25 00:05:20.000000000 +0100
186---- mercurial-1.0/mercurial/hgweb/hgweb_mod.py 2008-04-13 02:25:49.000000000 +0200
187-***************
188-*** 91,97 ****
189-          hook.redirect(True)
190-          self.mtime = -1
191-          self.reponame = name
192-!         self.archives = 'zip', 'gz', 'bz2'
193-          self.stripecount = 1
194-          self._capabilities = None
195-          # a repo owner may set web.templates in .hg/hgrc to get any file
196---- 91,97 ----
197-          hook.redirect(True)
198-          self.mtime = -1
199-          self.reponame = name
200-!         self.archives = 'zip', 'gz'
201-          self.stripecount = 1
202-          self._capabilities = None
203-          # a repo owner may set web.templates in .hg/hgrc to get any file
204-***************
205-*** 915,921 ****
206-                      diff=diff)
207
208-      archive_specs = {
209--         'bz2': ('application/x-tar', 'tbz2', '.tar.bz2', None),
210-          'gz': ('application/x-tar', 'tgz', '.tar.gz', None),
211-          'zip': ('application/zip', 'zip', '.zip', None),
212-          }
213---- 915,920 ----
214+diff -urN mercurial-1.1.2/mercurial/archival.py mercurial-1.1.2-nobz2/mercurial/archival.py
215+--- mercurial-1.1.2/mercurial/archival.py      2009-01-01 00:38:33.000000000 +0100
216++++ mercurial-1.1.2-nobz2/mercurial/archival.py        2009-01-01 13:53:14.000000000 +0100
217+@@ -65,8 +65,8 @@
218+                 self.fileobj.write(fname + '\000')
219+
220+     def __init__(self, dest, prefix, mtime, kind=''):
221+-        self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.bz2', '.tar.gz',
222+-                                                '.tgz', '.tbz2'])
223++        self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.gz',
224++                                                '.tgz'])
225+         self.mtime = mtime
226+
227+         def taropen(name, mode, fileobj=None):
228+@@ -179,7 +179,6 @@
229+ archivers = {
230+     'files': fileit,
231+     'tar': tarit,
232+-    'tbz2': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'bz2'),
233+     'tgz': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'gz'),
234+     'uzip': lambda name, prefix, mtime: zipit(name, prefix, mtime, False),
235+     'zip': zipit,
236+diff -urN mercurial-1.1.2/mercurial/bundlerepo.py mercurial-1.1.2-nobz2/mercurial/bundlerepo.py
237+--- mercurial-1.1.2/mercurial/bundlerepo.py    2009-01-01 00:38:33.000000000 +0100
238++++ mercurial-1.1.2-nobz2/mercurial/bundlerepo.py      2009-01-01 13:53:59.000000000 +0100
239+@@ -12,7 +12,7 @@
240+
241+ from node import hex, nullid, short
242+ from i18n import _
243+-import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff
244++import changegroup, util, os, struct, zlib, tempfile, shutil, mdiff
245+ import repo, localrepo, changelog, manifest, filelog, revlog, context
246+
247+ class bundlerevlog(revlog.revlog):
248+@@ -173,16 +173,13 @@
249+             raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename)
250+         elif not header.startswith("HG10"):
251+             raise util.Abort(_("%s: unknown bundle version") % bundlename)
252+-        elif (header == "HG10BZ") or (header == "HG10GZ"):
253++        elif (header == "HG10GZ"):
254+             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
255+                                             suffix=".hg10un", dir=self.path)
256+             self.tempfile = temp
257+             fptemp = os.fdopen(fdtemp, 'wb')
258+             def generator(f):
259+-                if header == "HG10BZ":
260+-                    zd = bz2.BZ2Decompressor()
261+-                    zd.decompress("BZ")
262+-                elif header == "HG10GZ":
263++                if header == "HG10GZ":
264+                     zd = zlib.decompressobj()
265+                 for chunk in f:
266+                     yield zd.decompress(chunk)
267+diff -urN mercurial-1.1.2/mercurial/changegroup.py mercurial-1.1.2-nobz2/mercurial/changegroup.py
268+--- mercurial-1.1.2/mercurial/changegroup.py   2009-01-01 00:38:33.000000000 +0100
269++++ mercurial-1.1.2-nobz2/mercurial/changegroup.py     2009-01-01 13:52:05.000000000 +0100
270+@@ -8,7 +8,7 @@
271+ """
272+
273+ from i18n import _
274+-import struct, os, bz2, zlib, util, tempfile
275++import struct, os, zlib, util, tempfile
276+
277+ def getchunk(source):
278+     """get a chunk from a changegroup"""
279+@@ -49,12 +49,11 @@
280+ bundletypes = {
281+     "": ("", nocompress),
282+     "HG10UN": ("HG10UN", nocompress),
283+-    "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()),
284+     "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
285+ }
286+
287+ # hgweb uses this list to communicate it's preferred type
288+-bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN']
289++bundlepriority = ['HG10GZ', 'HG10UN']
290+
291+ def writebundle(cg, filename, bundletype):
292+     """Write a bundle file and return its filename.
293+@@ -122,12 +121,6 @@
294+             zd = zlib.decompressobj()
295+             for chunk in f:
296+                 yield zd.decompress(chunk)
297+-    elif header == 'HG10BZ':
298+-        def generator(f):
299+-            zd = bz2.BZ2Decompressor()
300+-            zd.decompress("BZ")
301+-            for chunk in util.filechunkiter(f, 4096):
302+-                yield zd.decompress(chunk)
303+     return util.chunkbuffer(generator(fh))
304+
305+ def readbundle(fh, fname):
306+diff -urN mercurial-1.1.2/mercurial/hgweb/hgwebdir_mod.py mercurial-1.1.2-nobz2/mercurial/hgweb/hgwebdir_mod.py
307+--- mercurial-1.1.2/mercurial/hgweb/hgwebdir_mod.py    2009-01-01 00:38:33.000000000 +0100
308++++ mercurial-1.1.2-nobz2/mercurial/hgweb/hgwebdir_mod.py      2009-01-01 13:54:29.000000000 +0100
309+@@ -178,7 +178,7 @@
310+
311+         def archivelist(ui, nodeid, url):
312+             allowed = ui.configlist("web", "allow_archive", untrusted=True)
313+-            for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
314++            for i in [('zip', '.zip'), ('gz', '.tar.gz')]:
315+                 if i[0] in allowed or ui.configbool("web", "allow" + i[0],
316+                                                     untrusted=True):
317+                     yield {"type" : i[0], "extension": i[1],
318+diff -urN mercurial-1.1.2/mercurial/hgweb/hgweb_mod.py mercurial-1.1.2-nobz2/mercurial/hgweb/hgweb_mod.py
319+--- mercurial-1.1.2/mercurial/hgweb/hgweb_mod.py       2009-01-01 00:38:33.000000000 +0100
320++++ mercurial-1.1.2-nobz2/mercurial/hgweb/hgweb_mod.py 2009-01-01 13:55:08.000000000 +0100
321+@@ -35,7 +35,7 @@
322+         hook.redirect(True)
323+         self.mtime = -1
324+         self.reponame = name
325+-        self.archives = 'zip', 'gz', 'bz2'
326++        self.archives = 'zip', 'gz'
327+         self.stripecount = 1
328+         # a repo owner may set web.templates in .hg/hgrc to get any file
329+         # readable by the user running the CGI script
330+@@ -266,7 +266,6 @@
331+                 yield {"type" : i, "extension" : spec[2], "node" : nodeid}
332+
333+     archive_specs = {
334+-        'bz2': ('application/x-tar', 'tbz2', '.tar.bz2', None),
335+         'gz': ('application/x-tar', 'tgz', '.tar.gz', None),
336+         'zip': ('application/zip', 'zip', '.zip', None),
337+         }
338Index: mercurial/Makefile
339===================================================================
340--- mercurial/Makefile  (revision 13787)
341+++ mercurial/Makefile  (working copy)
342@@ -9,12 +9,12 @@
343 include $(TOPDIR)/rules.mk
344 
345 PKG_NAME:=mercurial
346-PKG_VERSION:=1.0.2
347+PKG_VERSION:=1.1.2
348 PKG_RELEASE:=1
349 
350 PKG_SOURCE_URL:=http://selenic.com/mercurial/release/
351 PKG_SOURCE:=mercurial-$(PKG_VERSION).tar.gz
352-PKG_MD5SUM:=32432616f517107e6582721c257cd1f4
353+PKG_MD5SUM:=4fd3b9a2e5dcd025840c3849b136bec8
354 PKG_BUILD_DEPENDS:=python
355 
356 include $(INCLUDE_DIR)/package.mk