Changeset 24864


Ignore:
Timestamp:
2011-01-01T15:05:35+01:00 (7 years ago)
Author:
swalker
Message:

[packages] mercurial: update to 1.7.2, refresh patches

Location:
packages/net/mercurial
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/mercurial/Makefile

    r22933 r24864  
    11# 
    2 # Copyright (C) 2006-2010 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    99 
    1010PKG_NAME:=mercurial 
    11 PKG_VERSION:=1.6.2 
    12 PKG_RELEASE:=2 
     11PKG_VERSION:=1.7.2 
     12PKG_RELEASE:=1 
    1313 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1415PKG_SOURCE_URL:=http://mercurial.selenic.com/release 
    15 PKG_SOURCE:=mercurial-$(PKG_VERSION).tar.gz 
    16 PKG_MD5SUM:=847359d7488caf8074a69d4b87ca64d2 
     16PKG_MD5SUM:=e9e99a0a20ded8f6d9463ffb94021b12 
     17 
    1718PKG_BUILD_DEPENDS:=python-mini 
    1819 
     
    3031 
    3132define Package/mercurial/description 
    32   A fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects. 
     33  A fast, lightweight Source Control Management system designed for efficient 
     34  handling of very large distributed projects. 
    3335endef 
    3436 
     
    4244        $(INSTALL_DIR) $(1)/usr/bin 
    4345        $(INSTALL_DIR) $(1)/usr/lib 
    44         $(CP) $(PKG_INSTALL_DIR)/bin $(1)/usr 
    45         $(CP) $(PKG_INSTALL_DIR)/lib $(1)/usr 
     46        $(CP) $(PKG_INSTALL_DIR)/bin $(1)/usr/ 
     47        $(CP) $(PKG_INSTALL_DIR)/lib $(1)/usr/ 
    4648endef 
    4749 
  • packages/net/mercurial/patches/001-no_bzip2.patch

    r22894 r24864  
    1 diff -urN mercurial-1.6.2/mercurial/archival.py mercurial-1.6.2-nobz2/mercurial/archival.py 
    2 --- mercurial-1.6.2/mercurial/archival.py       2009-01-01 00:38:33.000000000 +0100 
    3 +++ mercurial-1.6.2-nobz2/mercurial/archival.py 2009-01-01 13:53:14.000000000 +0100 
    4 @@ -67,8 +67,8 @@ 
    5                  self.fileobj.write(fname + '\000') 
     1--- a/mercurial/archival.py 
     2+++ b/mercurial/archival.py 
     3@@ -37,7 +37,6 @@ def tidyprefix(dest, kind, prefix): 
    64  
    7      def __init__(self, dest, prefix, mtime, kind=''): 
    8 -        self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.bz2', '.tar.gz', 
    9 -                                                '.tgz', '.tbz2']) 
    10 +        self.prefix = tidyprefix(dest, prefix, ['.tar', '.tar.gz', 
    11 +                                                '.tgz']) 
    12          self.mtime = mtime 
     5 exts = { 
     6     'tar': ['.tar'], 
     7-    'tbz2': ['.tbz2', '.tar.bz2'], 
     8     'tgz': ['.tgz', '.tar.gz'], 
     9     'zip': ['.zip'], 
     10     } 
     11@@ -51,7 +50,7 @@ def guesskind(dest): 
    1312  
    14          def taropen(name, mode, fileobj=None): 
    15 @@ -182,7 +182,6 @@ 
     13 class tarit(object): 
     14     '''write archive to tar file or stream.  can write uncompressed, 
     15-    or compress with gzip or bzip2.''' 
     16+    or compress with gzip.''' 
     17  
     18     class GzipFileWithTime(gzip.GzipFile): 
     19  
     20@@ -198,7 +197,6 @@ class fileit(object): 
    1621 archivers = { 
    1722     'files': fileit, 
    1823     'tar': tarit, 
    19 -    'tbz2': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'bz2'), 
    20      'tgz': lambda name, prefix, mtime: tarit(name, prefix, mtime, 'gz'), 
    21      'uzip': lambda name, prefix, mtime: zipit(name, prefix, mtime, False), 
     24-    'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'), 
     25     'tgz': lambda name, mtime: tarit(name, mtime, 'gz'), 
     26     'uzip': lambda name, mtime: zipit(name, mtime, False), 
    2227     'zip': zipit, 
    23 diff -urN mercurial-1.6.2/mercurial/bundlerepo.py mercurial-1.6.2-nobz2/mercurial/bundlerepo.py 
    24 --- mercurial-1.6.2/mercurial/bundlerepo.py     2009-01-01 00:38:33.000000000 +0100 
    25 +++ mercurial-1.6.2-nobz2/mercurial/bundlerepo.py       2009-01-01 13:53:59.000000000 +0100 
    26 @@ -13,7 +13,7 @@ 
     28--- a/mercurial/bundlerepo.py 
     29+++ b/mercurial/bundlerepo.py 
     30@@ -312,7 +312,7 @@ def getremotechanges(ui, repo, other, re 
     31             cg = other.changegroup(incoming, "incoming") 
     32         else: 
     33             cg = other.changegroupsubset(incoming, revs, 'incoming') 
     34-        bundletype = other.local() and "HG10BZ" or "HG10UN" 
     35+        bundletype = other.local() and "HG10GZ" or "HG10UN" 
     36         fname = bundle = changegroup.writebundle(cg, bundlename, bundletype) 
     37         # keep written bundle? 
     38         if bundlename: 
     39--- a/mercurial/changegroup.py 
     40+++ b/mercurial/changegroup.py 
     41@@ -7,7 +7,7 @@ 
    2742  
    28  from node import nullid 
    29  from i18n import _ 
    30 -import os, struct, bz2, zlib, tempfile, shutil 
    31 +import os, struct, zlib, tempfile, shutil 
    32  import changegroup, util, mdiff 
    33  import localrepo, changelog, manifest, filelog, revlog, error 
    34   
    35 @@ -177,16 +177,13 @@ 
    36              raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename) 
    37          elif not header.startswith("HG10"): 
    38              raise util.Abort(_("%s: unknown bundle version") % bundlename) 
    39 -        elif (header == "HG10BZ") or (header == "HG10GZ"): 
    40 +        elif (header == "HG10GZ"): 
    41              fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-", 
    42                                              suffix=".hg10un", dir=self.path) 
    43              self.tempfile = temp 
    44              fptemp = os.fdopen(fdtemp, 'wb') 
    45              def generator(f): 
    46 -                if header == "HG10BZ": 
    47 -                    zd = bz2.BZ2Decompressor() 
    48 -                    zd.decompress("BZ") 
    49 -                elif header == "HG10GZ": 
    50 +                if header == "HG10GZ": 
    51                      zd = zlib.decompressobj() 
    52                  for chunk in f: 
    53                      yield zd.decompress(chunk) 
    54 diff -urN mercurial-1.6.2/mercurial/changegroup.py mercurial-1.6.2-nobz2/mercurial/changegroup.py 
    55 --- mercurial-1.6.2/mercurial/changegroup.py    2009-01-01 00:38:33.000000000 +0100 
    56 +++ mercurial-1.6.2-nobz2/mercurial/changegroup.py      2009-01-01 13:52:05.000000000 +0100 
    57 @@ -8,5 +8,5 @@ 
    5843 from i18n import _ 
    5944 import util 
     
    6247  
    6348 def getchunk(source): 
    64 @@ -52,7 +52,6 @@ 
     49     """return the next chunk from changegroup 'source' as a string""" 
     50@@ -41,7 +41,6 @@ class nocompress(object): 
    6551 bundletypes = { 
    6652     "": ("", nocompress), 
     
    7056 } 
    7157  
    72 @@ -69,4 +68,4 @@ 
     58@@ -55,14 +54,13 @@ def collector(cl, mmfs, files): 
     59     return collect 
     60  
    7361 # hgweb uses this list to communicate its preferred type 
    7462-bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] 
     
    7664  
    7765 def writebundle(cg, filename, bundletype): 
    78 @@ -135,12 +134,6 @@ 
     66     """Write a bundle file and return its filename. 
     67  
     68     Existing files will not be overwritten. 
     69     If no filename is specified, a temporary file is created. 
     70-    bz2 compression can be turned off. 
     71     The bundle file will be deleted in case of errors. 
     72     """ 
     73  
     74@@ -120,12 +118,6 @@ def decompressor(fh, alg): 
    7975             zd = zlib.decompressobj() 
    8076             for chunk in f: 
    8177                 yield zd.decompress(chunk) 
    82 -    elif header == 'HG10BZ': 
     78-    elif alg == 'BZ': 
    8379-        def generator(f): 
    8480-            zd = bz2.BZ2Decompressor() 
     
    8682-            for chunk in util.filechunkiter(f, 4096): 
    8783-                yield zd.decompress(chunk) 
     84     else: 
     85         raise util.Abort("unknown bundle compression '%s'" % alg) 
    8886     return util.chunkbuffer(generator(fh)) 
    89   
    90  def readbundle(fh, fname): 
    91 diff -urN mercurial-1.6.2/mercurial/hgweb/hgwebdir_mod.py mercurial-1.6.2-nobz2/mercurial/hgweb/hgwebdir_mod.py 
    92 --- mercurial-1.6.2/mercurial/hgweb/hgwebdir_mod.py     2009-01-01 00:38:33.000000000 +0100 
    93 +++ mercurial-1.6.2-nobz2/mercurial/hgweb/hgwebdir_mod.py       2009-01-01 13:54:29.000000000 +0100 
    94 @@ -191,7 +191,7 @@ 
     87--- a/mercurial/hgweb/hgwebdir_mod.py 
     88+++ b/mercurial/hgweb/hgwebdir_mod.py 
     89@@ -192,7 +192,7 @@ class hgwebdir(object): 
    9590  
    9691         def archivelist(ui, nodeid, url): 
     
    10196                                                     untrusted=True): 
    10297                     yield {"type" : i[0], "extension": i[1], 
    103 diff -urN mercurial-1.6.2/mercurial/hgweb/hgweb_mod.py mercurial-1.6.2-nobz2/mercurial/hgweb/hgweb_mod.py 
    104 --- mercurial-1.6.2/mercurial/hgweb/hgweb_mod.py        2009-01-01 00:38:33.000000000 +0100 
    105 +++ mercurial-1.6.2-nobz2/mercurial/hgweb/hgweb_mod.py  2009-01-01 13:55:08.000000000 +0100 
    106 @@ -38,7 +38,7 @@ 
     98--- a/mercurial/hgweb/hgweb_mod.py 
     99+++ b/mercurial/hgweb/hgweb_mod.py 
     100@@ -39,7 +39,7 @@ class hgweb(object): 
    107101         hook.redirect(True) 
    108102         self.mtime = -1 
     
    113107         # a repo owner may set web.templates in .hg/hgrc to get any file 
    114108         # readable by the user running the CGI script 
    115 @@ -281,7 +281,6 @@ 
     109@@ -280,7 +280,6 @@ class hgweb(object): 
    116110                 yield {"type" : i, "extension" : spec[2], "node" : nodeid} 
    117111  
    118112     archive_specs = { 
    119 -        'bz2': ('application/x-tar', 'tbz2', '.tar.bz2', None), 
    120          'gz': ('application/x-tar', 'tgz', '.tar.gz', None), 
     113-        'bz2': ('application/x-bzip2', 'tbz2', '.tar.bz2', None), 
     114         'gz': ('application/x-gzip', 'tgz', '.tar.gz', None), 
    121115         'zip': ('application/zip', 'zip', '.zip', None), 
    122116         } 
    123 diff -urN mercurial-1.6.2/mercurial/repair.py mercurial-1.6.2-nobz2/mercurial/repair.py 
    124 --- mercurial-1.6.2/mercurial/repair.py 2009-01-01 00:38:33.000000000 +0100 
    125 +++ mercurial-1.6.2-nobz2/mercurial/repair.py   2009-01-01 13:55:08.000000000 +0100 
    126 @@ -20,4 +20,4 @@ 
     117--- a/mercurial/repair.py 
     118+++ b/mercurial/repair.py 
     119@@ -19,7 +19,7 @@ def _bundle(repo, bases, heads, node, su 
     120         os.mkdir(backupdir) 
    127121     name = os.path.join(backupdir, "%s-%s.hg" % (short(node), suffix)) 
    128 -    return changegroup.writebundle(cg, name, "HG10BZ") 
    129 +    return changegroup.writebundle(cg, name, "HG10GZ") 
     122     if compress: 
     123-        bundletype = "HG10BZ" 
     124+        bundletype = "HG10GZ" 
     125     else: 
     126         bundletype = "HG10UN" 
     127     return changegroup.writebundle(cg, name, bundletype) 
     128--- a/mercurial/commands.py 
     129+++ b/mercurial/commands.py 
     130@@ -162,7 +162,6 @@ def archive(ui, repo, dest, **opts): 
    130131  
    131  def _collectfiles(repo, striprev): 
    132 diff -urN mercurial-1.6.2/mercurial/commands.py mercurial-1.6.2-nobz2/mercurial/commands.py 
    133 --- mercurial-1.6.2/mercurial/commands.py       2009-01-01 00:38:33.000000000 +0100 
    134 +++ mercurial-1.6.2-nobz2/mercurial/commands.py 2009-01-01 13:55:08.000000000 +0100 
    135 @@ -200,7 +200,6 @@ 
    136      def guess_type(): 
    137          exttypes = { 
    138              'tar': ['.tar'], 
    139 -            'tbz2': ['.tbz2', '.tar.bz2'], 
    140              'tgz': ['.tgz', '.tar.gz'], 
    141              'zip': ['.zip'], 
    142          } 
    143 @@ -613,8 +612,8 @@ 
     132     :``files``: a directory full of files (default) 
     133     :``tar``:   tar archive, uncompressed 
     134-    :``tbz2``:  tar archive, compressed using bzip2 
     135     :``tgz``:   tar archive, compressed using gzip 
     136     :``uzip``:  zip archive, uncompressed 
     137     :``zip``:   zip archive, compressed using deflate 
     138@@ -559,8 +558,8 @@ def bundle(ui, repo, fname, dest=None, * 
     139     -a/--all (or --base null). 
     140  
     141     You can change compression method with the -t/--type option. 
     142-    The available compression methods are: none, bzip2, and 
     143-    gzip (by default, bundles are compressed using bzip2). 
     144+    The available compression methods are: none, and 
     145+    gzip (by default, bundles are compressed using gzip). 
     146  
     147     The bundle file can then be transferred using conventional means 
     148     and applied to another repository with the unbundle or pull 
     149@@ -624,8 +623,8 @@ def bundle(ui, repo, fname, dest=None, * 
    144150     else: 
    145151         cg = repo.changegroup(o, 'bundle') 
     
    152158     if bundletype not in changegroup.bundletypes: 
    153159         raise util.Abort(_('unknown bundle type specified with --type')) 
    154 @@ -2365,7 +2364,7 @@ 
    155                  cg = other.changegroup(incoming, "incoming") 
    156              else: 
    157                  cg = other.changegroupsubset(incoming, revs, 'incoming') 
    158 -            bundletype = other.local() and "HG10BZ" or "HG10UN" 
    159 +            bundletype = other.local() and "HG10GZ" or "HG10UN" 
    160              fname = cleanup = changegroup.writebundle(cg, fname, bundletype) 
    161              # keep written bundle? 
    162              if opts["bundle"]: 
    163 @@ -4043,7 +4042,7 @@ 
     160@@ -4084,7 +4083,7 @@ table = { 
    164161            _('a base changeset assumed to be available at the destination'), 
    165162            _('REV')), 
     
    170167          ] + remoteopts, 
    171168          _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')), 
    172 diff -urN mercurial-1.6.2/setup.py mercurial-1.6.2-nobz2/setup.py 
    173 --- mercurial-1.6.2/setup.py    2009-01-01 00:38:33.000000000 +0100 
    174 +++ mercurial-1.6.2-nobz2/setup.py      2009-01-01 13:55:08.000000000 +0100 
    175 @@ -27,9 +27,3 @@ 
     169--- a/setup.py 
     170+++ b/setup.py 
     171@@ -36,12 +36,6 @@ except: 
     172     raise SystemExit( 
    176173         "Couldn't import standard zlib (incomplete Python install).") 
    177 - 
     174  
    178175-try: 
    179176-    import bz2 
     
    181178-    raise SystemExit( 
    182179-        "Couldn't import standard bz2 (incomplete Python install).") 
    183   
     180- 
    184181 import os, subprocess, time 
     182 import shutil 
     183 import tempfile 
Note: See TracChangeset for help on using the changeset viewer.