class GzipFileWithTime(gzip.GzipFile):
-@@ -198,7 +197,6 @@ class fileit(object):
+@@ -205,7 +204,6 @@ class fileit(object):
archivers = {
'files': fileit,
'tar': tarit,
'zip': zipit,
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
-@@ -312,7 +312,7 @@ def getremotechanges(ui, repo, other, re
+@@ -307,7 +307,7 @@ def getremotechanges(ui, repo, other, re
cg = other.changegroup(incoming, "incoming")
else:
cg = other.changegroupsubset(incoming, revs, 'incoming')
-import struct, os, bz2, zlib, tempfile
+import struct, os, zlib, tempfile
- def getchunk(source):
- """return the next chunk from changegroup 'source' as a string"""
-@@ -41,7 +41,6 @@ class nocompress(object):
+ def readexactly(stream, n):
+ '''read n bytes from stream.read and abort if less was available'''
+@@ -45,7 +45,6 @@ class nocompress(object):
bundletypes = {
"": ("", nocompress),
"HG10UN": ("HG10UN", nocompress),
"HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
}
-@@ -55,14 +54,13 @@ def collector(cl, mmfs, files):
+@@ -59,14 +58,13 @@ def collector(cl, mmfs, files):
return collect
# hgweb uses this list to communicate its preferred type
The bundle file will be deleted in case of errors.
"""
-@@ -120,12 +118,6 @@ def decompressor(fh, alg):
+@@ -124,12 +122,6 @@ def decompressor(fh, alg):
zd = zlib.decompressobj()
for chunk in f:
yield zd.decompress(chunk)
return util.chunkbuffer(generator(fh))
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
-@@ -192,7 +192,7 @@ class hgwebdir(object):
-
+@@ -204,7 +204,7 @@ class hgwebdir(object):
def archivelist(ui, nodeid, url):
allowed = ui.configlist("web", "allow_archive", untrusted=True)
+ archives = []
- for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
+ for i in [('zip', '.zip'), ('gz', '.tar.gz')]:
if i[0] in allowed or ui.configbool("web", "allow" + i[0],
untrusted=True):
- yield {"type" : i[0], "extension": i[1],
+ archives.append({"type" : i[0], "extension": i[1],
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -39,7 +39,7 @@ class hgweb(object):
:``tgz``: tar archive, compressed using gzip
:``uzip``: zip archive, uncompressed
:``zip``: zip archive, compressed using deflate
-@@ -559,8 +558,8 @@ def bundle(ui, repo, fname, dest=None, *
+@@ -644,8 +643,8 @@ def bundle(ui, repo, fname, dest=None, *
-a/--all (or --base null).
You can change compression method with the -t/--type option.
The bundle file can then be transferred using conventional means
and applied to another repository with the unbundle or pull
-@@ -624,8 +623,8 @@ def bundle(ui, repo, fname, dest=None, *
+@@ -712,8 +711,8 @@ def bundle(ui, repo, fname, dest=None, *
else:
cg = repo.changegroup(o, 'bundle')
bundletype = btypes.get(bundletype)
if bundletype not in changegroup.bundletypes:
raise util.Abort(_('unknown bundle type specified with --type'))
-@@ -4084,7 +4083,7 @@ table = {
+@@ -4307,7 +4306,7 @@ table = {
_('a base changeset assumed to be available at the destination'),
_('REV')),
('a', 'all', None, _('bundle all changesets in the repository')),