[arch-commits] Commit in bzr-fastimport/trunk (PKGBUILD helpers.patch)
Martin Wimpress
flexiondotorg at nymeria.archlinux.org
Thu Apr 3 15:48:04 UTC 2014
Date: Thursday, April 3, 2014 @ 17:48:04
Author: flexiondotorg
Revision: 108776
upgpkg: bzr-fastimport 0.13.0-5 - Replace calls to helpers that have been obsoleted in python2-fastimport
Added:
bzr-fastimport/trunk/helpers.patch
Modified:
bzr-fastimport/trunk/PKGBUILD
---------------+
PKGBUILD | 16 ++++++++--
helpers.patch | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 101 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-04-03 10:30:48 UTC (rev 108775)
+++ PKGBUILD 2014-04-03 15:48:04 UTC (rev 108776)
@@ -2,15 +2,25 @@
pkgname=bzr-fastimport
pkgver=0.13.0
-pkgrel=4
+pkgrel=5
pkgdesc="Bazaar Fast Import is a plugin providing fast loading of revision control data into Bazaar."
arch=('any')
url="https://launchpad.net/bzr-fastimport"
license=('GPL2')
depends=('bzr' 'python2-fastimport')
-source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz")
-md5sums=('e47115774d44ae0c3b027ae0374aa52e')
+source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
+ "helpers.patch")
+md5sums=('e47115774d44ae0c3b027ae0374aa52e'
+ '629f233bf6b0af41ccff6d561d2c91b2')
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # Remove calls to helpers that have been obsoleted in python2-fastimport
+ # - http://bazaar.launchpad.net/~jelmer/python-fastimport/trunk/revision/328
+ # - http://bazaar.launchpad.net/~jelmer/python-fastimport/trunk/revision/327
+ patch -Np1 -i "${srcdir}/helpers.patch"
+}
+
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python2 setup.py install --root="${pkgdir}" --optimize=1
Added: helpers.patch
===================================================================
--- helpers.patch (rev 0)
+++ helpers.patch 2014-04-03 15:48:04 UTC (rev 108776)
@@ -0,0 +1,88 @@
+diff -rupN bzr-fastimport-orig/branch_updater.py bzr-fastimport-0.13.0/branch_updater.py
+--- bzr-fastimport-orig/branch_updater.py 2012-02-29 11:50:32.000000000 +0000
++++ bzr-fastimport-0.13.0/branch_updater.py 2014-04-03 15:43:55.373988397 +0100
+@@ -149,7 +149,6 @@ class BranchUpdater(object):
+
+ :return: whether the branch was changed or not
+ """
+- from fastimport.helpers import single_plural
+ last_rev_id = self.cache_mgr.lookup_committish(last_mark)
+ self.repo.lock_read()
+ try:
+@@ -174,7 +173,6 @@ class BranchUpdater(object):
+ changed = True
+ if changed:
+ tagno = len(my_tags)
+- note("\t branch %s now has %d %s and %d %s", br.nick,
+- revno, single_plural(revno, "revision", "revisions"),
+- tagno, single_plural(tagno, "tag", "tags"))
++ note("\t branch %s now has %d %s and %d %s", br.nick, \
++ revno, "revision(s)", tagno, "tag(s)")
+ return changed
+diff -rupN bzr-fastimport-orig/cache_manager.py bzr-fastimport-0.13.0/cache_manager.py
+--- bzr-fastimport-orig/cache_manager.py 2012-02-29 11:50:32.000000000 +0000
++++ bzr-fastimport-0.13.0/cache_manager.py 2014-04-03 15:45:23.402088096 +0100
+@@ -28,9 +28,6 @@ from bzrlib.plugins.fastimport import (
+ from bzrlib.plugins.fastimport.reftracker import (
+ RefTracker,
+ )
+-from fastimport.helpers import (
+- single_plural,
+- )
+
+
+ class _Cleanup(object):
+@@ -162,8 +159,7 @@ class CacheManager(object):
+ if size > 1024:
+ size = size / 1024
+ unit = 'G'
+- note(" %-12s: %8.1f %s (%d %s)" % (label, size, unit, count,
+- single_plural(count, "item", "items")))
++ note(" %-12s: %8.1f %s (%d %s)" % (label, size, unit, count, "item(s)"))
+
+ def clear_all(self):
+ """Free up any memory used by the caches."""
+diff -rupN bzr-fastimport-orig/cmds.py bzr-fastimport-0.13.0/cmds.py
+--- bzr-fastimport-orig/cmds.py 2012-02-29 11:50:32.000000000 +0000
++++ bzr-fastimport-0.13.0/cmds.py 2014-04-03 15:47:43.074360586 +0100
+@@ -42,8 +42,7 @@ def _run(source, processor_factory, verb
+ def _get_source_stream(source):
+ if source == '-' or source is None:
+ import sys
+- from fastimport import helpers
+- stream = helpers.binary_stream(sys.stdin)
++ stream = sys.stdin
+ elif source.endswith('.gz'):
+ import gzip
+ stream = gzip.open(source, "rb")
+diff -rupN bzr-fastimport-orig/exporter.py bzr-fastimport-0.13.0/exporter.py
+--- bzr-fastimport-orig/exporter.py 2012-02-29 11:50:32.000000000 +0000
++++ bzr-fastimport-0.13.0/exporter.py 2014-04-03 15:48:27.075076168 +0100
+@@ -64,15 +64,11 @@ from bzrlib.plugins.fastimport import (
+ )
+
+ from fastimport import commands
+-from fastimport.helpers import (
+- binary_stream,
+- single_plural,
+- )
+
+
+ def _get_output_stream(destination):
+ if destination is None or destination == '-':
+- return binary_stream(sys.stdout)
++ return sys.stdout
+ elif destination.endswith('gz'):
+ import gzip
+ return gzip.open(destination, 'wb')
+@@ -277,9 +273,7 @@ class BzrFastExporter(object):
+ def dump_stats(self):
+ time_required = progress.str_tdelta(time.time() - self._start_time)
+ rc = len(self.revid_to_mark)
+- self.note("Exported %d %s in %s",
+- rc, single_plural(rc, "revision", "revisions"),
+- time_required)
++ self.note("Exported %d %s in %s", rc, "revision(s)", time_required)
+
+ def print_cmd(self, cmd):
+ self.outf.write("%r\n" % cmd)
More information about the arch-commits
mailing list