mercurial/httppeer.py
changeset 25954 7bbdb78d2842
parent 25660 328739ea70c3
child 26587 56b2bcea2529
equal deleted inserted replaced
25953:d15b279ddade 25954:7bbdb78d2842
     4 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
     4 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
     5 #
     5 #
     6 # This software may be used and distributed according to the terms of the
     6 # This software may be used and distributed according to the terms of the
     7 # GNU General Public License version 2 or any later version.
     7 # GNU General Public License version 2 or any later version.
     8 
     8 
     9 from node import nullid
     9 from __future__ import absolute_import
    10 from i18n import _
    10 
       
    11 import errno
       
    12 import httplib
       
    13 import os
       
    14 import socket
    11 import tempfile
    15 import tempfile
    12 import changegroup, statichttprepo, error, httpconnection, url, util, wireproto
    16 import urllib
    13 import os, urllib, urllib2, zlib, httplib
    17 import urllib2
    14 import errno, socket
    18 import zlib
       
    19 
       
    20 from .i18n import _
       
    21 from .node import nullid
       
    22 from . import (
       
    23     changegroup,
       
    24     error,
       
    25     httpconnection,
       
    26     statichttprepo,
       
    27     url,
       
    28     util,
       
    29     wireproto,
       
    30 )
    15 
    31 
    16 def zgenerator(f):
    32 def zgenerator(f):
    17     zd = zlib.decompressobj()
    33     zd = zlib.decompressobj()
    18     try:
    34     try:
    19         for chunk in util.filechunkiter(f):
    35         for chunk in util.filechunkiter(f):