Hello community, here is the log from the commit of package bzr checked in at Wed Sep 24 15:05:59 CEST 2008. -------- --- bzr/bzr.changes 2008-09-10 11:38:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/bzr/bzr.changes 2008-09-23 17:17:22.213882000 +0200 @@ -1,0 +2,5 @@ +Tue Sep 23 17:17:19 CEST 2008 - kssingvo@suse.de + +- fixed issue introduced with switch to python-2.6 (bnc#425644) + +------------------------------------------------------------------- New: ---- bug_269535.patch bzr-1.6.1-no_py2.5_message.patch bzr-1.6.1-sha.patch bzr-U32removal.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bzr.spec ++++++ --- /var/tmp/diff_new_pack.d30005/_old 2008-09-24 15:05:47.000000000 +0200 +++ /var/tmp/diff_new_pack.d30005/_new 2008-09-24 15:05:47.000000000 +0200 @@ -25,10 +25,14 @@ AutoReqProv: on Summary: Friendly distributed version control system Version: 1.6.1 -Release: 1 +Release: 4 Source: http://bazaar-vcs.org/pkg/bzr-%{version}.tar.bz2 Url: http://bazaar-vcs.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch0: http://launchpadlibrarian.net/17565472/bug_269535.patch +Patch1: http://launchpadlibrarian.net/17566365/bzr-U32removal.patch +Patch2: bzr-1.6.1-sha.patch +Patch3: bzr-1.6.1-no_py2.5_message.patch Requires: python-xml %py_requires @@ -46,6 +50,10 @@ %prep %setup +%patch0 -p0 +%patch1 -p0 +%patch2 -p1 +%patch3 -p1 %build @@ -67,6 +75,8 @@ %doc doc contrib tools BRANCH.TODO COPYING.txt NEWS README TODO %changelog +* Tue Sep 23 2008 kssingvo@suse.de +- fixed issue introduced with switch to python-2.6 (bnc#425644) * Wed Sep 10 2008 kssingvo@suse.de - upgrade to version 1.6.1: * many bugfixes and changes, see included NEWS file for details ++++++ bug_269535.patch ++++++ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: john@arbash-meinel.com-20080912193218-obilmhxm4nthkmj4 # target_branch: http://bazaar-vcs.org/bzr/bzr.dev # testament_sha1: 8a47c90554a49915df585c9fd7beaf0263e1ca2d # timestamp: 2008-09-12 14:32:36 -0500 # source_branch: http://bzr.arbash-meinel.com/branches/bzr/jam-\ # integration # base_revision_id: pqm@pqm.ubuntu.com-20080912142101-kj49buaas8zsqf5x # # Begin patch === modified file 'NEWS' --- NEWS 2008-09-12 14:21:01 +0000 +++ NEWS 2008-09-12 19:32:18 +0000 @@ -25,6 +25,9 @@ when doing ``bzr pull`` or ``bzr merge`` from a ``bzr+ssh`` URL. (Andrew Bennetts, #246233) + * Some python2.6 minor compatibility fixes. + (John Arbash Meinel, Felix, #269535) + DOCUMENTATION: API CHANGES: === modified file 'bzrlib/transport/__init__.py' --- bzrlib/transport/__init__.py 2008-09-10 19:14:43 +0000 +++ bzrlib/transport/__init__.py 2008-09-12 19:29:51 +0000 @@ -293,7 +293,7 @@ _bytes_to_read_before_seek = 0 def __init__(self, base): - super(Transport, self).__init__(base=base) + super(Transport, self).__init__() self.base = base def _translate_error(self, e, path, raise_generic=True): ++++++ bzr-1.6.1-no_py2.5_message.patch ++++++ --- bzr-1.6.1/bzrlib/errors.py.orig 2008-09-05 22:12:49.000000000 +0200 +++ bzr-1.6.1/bzrlib/errors.py 2008-09-23 16:07:06.000000000 +0200 @@ -102,9 +102,6 @@ class BzrError(StandardError): fmt = self._get_format_string() if fmt: d = dict(self.__dict__) - # special case: python2.5 puts the 'message' attribute in a - # slot, so it isn't seen in __dict__ - d['message'] = getattr(self, 'message', 'no message') s = fmt % d # __str__() should always return a 'str' object # never a 'unicode' object. ++++++ bzr-1.6.1-sha.patch ++++++ --- bzr-1.6.1/bzrlib/osutils.py.orig 2008-09-05 22:12:49.000000000 +0200 +++ bzr-1.6.1/bzrlib/osutils.py 2008-09-23 15:59:03.000000000 +0200 @@ -35,7 +35,6 @@ from ntpath import (abspath as _nt_abspa splitdrive as _nt_splitdrive, ) import posixpath -import sha import shutil from shutil import ( rmtree, @@ -53,6 +52,18 @@ from bzrlib import ( ) """) +# sha is deprecated in python2.6 but hashlib is available as of 2.5 +if sys.version_info < (2, 5): + import md5 as _md5 + md5 = _md5.new + import sha as _sha + sha = _sha.new +else: + from hashlib import ( + md5, + sha1 as sha, + ) + import bzrlib from bzrlib import symbol_versioning @@ -606,21 +617,21 @@ def sha_file_by_name(fname): os.close(f) -def sha_strings(strings, _factory=sha.new): +def sha_strings(strings, _factory=sha): """Return the sha-1 of concatenation of strings""" s = _factory() map(s.update, strings) return s.hexdigest() -def sha_string(f, _factory=sha.new): +def sha_string(f, _factory=sha): return _factory(f).hexdigest() def fingerprint_file(f): b = f.read() return {'size': len(b), - 'sha1': sha.new(b).hexdigest()} + 'sha1': sha(b).hexdigest()} def compare_files(a, b): --- bzr-1.6.1/bzrlib/weave.py.orig 2008-09-05 22:12:59.000000000 +0200 +++ bzr-1.6.1/bzrlib/weave.py 2008-09-23 16:03:16.000000000 +0200 @@ -71,7 +71,6 @@ from copy import copy from cStringIO import StringIO import os -import sha import time import warnings @@ -86,7 +85,7 @@ from bzrlib.errors import (WeaveError, W WeaveRevisionNotPresent, ) import bzrlib.errors as errors -from bzrlib.osutils import dirname, sha_strings, split_lines +from bzrlib.osutils import dirname, sha, sha_strings, split_lines import bzrlib.patiencediff from bzrlib.revision import NULL_REVISION from bzrlib.symbol_versioning import * @@ -799,7 +798,7 @@ class Weave(VersionedFile): # For creating the ancestry, IntSet is much faster (3.7s vs 0.17s) # The problem is that set membership is much more expensive name = self._idx_to_name(i) - sha1s[name] = sha.new() + sha1s[name] = sha() texts[name] = [] new_inc = set([name]) for p in self._parents[i]: --- bzr-1.6.1/bzrlib/hashcache.py.orig 2008-09-05 22:12:49.000000000 +0200 +++ bzr-1.6.1/bzrlib/hashcache.py 2008-09-23 16:58:49.000000000 +0200 @@ -30,9 +30,9 @@ CACHE_HEADER = "### bzr hashcache v5\n" import os, stat, time -import sha +import -from bzrlib.osutils import sha_file, pathjoin, safe_unicode +from bzrlib.osutils import sha, sha_file, pathjoin, safe_unicode from bzrlib.trace import mutter, warning from bzrlib.atomicfile import AtomicFile from bzrlib.errors import BzrError @@ -164,7 +164,7 @@ class HashCache(object): if stat.S_ISREG(mode): digest = self._really_sha1_file(abspath) elif stat.S_ISLNK(mode): - digest = sha.new(os.readlink(abspath)).hexdigest() + digest = sha(os.readlink(abspath)).hexdigest() else: raise BzrError("file %r: unknown file stat mode: %o"%(abspath,mode)) --- bzr-1.6.1/bzrlib/testament.py.orig 2008-09-05 22:12:50.000000000 +0200 +++ bzr-1.6.1/bzrlib/testament.py 2008-09-23 17:01:35.000000000 +0200 @@ -72,7 +72,7 @@ Testament format 1 from copy import copy from sha import sha -from bzrlib.osutils import contains_whitespace, contains_linebreaks +from bzrlib.osutils import contains_whitespace, contains_linebreaks, sha class Testament(object): --- bzr-1.6.1/bzrlib/tests/test_hashcache.py.orig 2008-09-05 22:12:55.000000000 +0200 +++ bzr-1.6.1/bzrlib/tests/test_hashcache.py 2008-09-23 17:03:55.000000000 +0200 @@ -15,7 +15,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sha import stat import sys import time @@ -26,7 +25,7 @@ from bzrlib.tests import OsFifoFeature, def sha1(t): - return sha.new(t).hexdigest() + return osutils.sha(t).hexdigest() def pause(): --- bzr-1.6.1/bzrlib/tests/test_knit.py.orig 2008-09-05 22:12:56.000000000 +0200 +++ bzr-1.6.1/bzrlib/tests/test_knit.py 2008-09-23 17:06:16.000000000 +0200 @@ -19,7 +19,6 @@ from cStringIO import StringIO import difflib import gzip -import sha import sys from bzrlib import ( @@ -375,7 +374,7 @@ class LowLevelKnitDataTests(TestCase): return sio.getvalue() def test_valid_knit_data(self): - sha1sum = sha.new('foo\nbar\n').hexdigest() + sha1sum = osutils.sha('foo\nbar\n').hexdigest() gz_txt = self.create_gz_content('version rev-id-1 2 %s\n' 'foo\n' 'bar\n' @@ -394,7 +393,7 @@ class LowLevelKnitDataTests(TestCase): self.assertEqual([(('rev-id-1',), gz_txt, sha1sum)], raw_contents) def test_not_enough_lines(self): - sha1sum = sha.new('foo\n').hexdigest() + sha1sum = osutils.sha('foo\n').hexdigest() # record says 2 lines data says 1 gz_txt = self.create_gz_content('version rev-id-1 2 %s\n' 'foo\n' @@ -412,7 +411,7 @@ class LowLevelKnitDataTests(TestCase): self.assertEqual([(('rev-id-1',), gz_txt, sha1sum)], raw_contents) def test_too_many_lines(self): - sha1sum = sha.new('foo\nbar\n').hexdigest() + sha1sum = osutils.sha('foo\nbar\n').hexdigest() # record says 1 lines data says 2 gz_txt = self.create_gz_content('version rev-id-1 1 %s\n' 'foo\n' @@ -431,7 +430,7 @@ class LowLevelKnitDataTests(TestCase): self.assertEqual([(('rev-id-1',), gz_txt, sha1sum)], raw_contents) def test_mismatched_version_id(self): - sha1sum = sha.new('foo\nbar\n').hexdigest() + sha1sum = osutils.sha('foo\nbar\n').hexdigest() gz_txt = self.create_gz_content('version rev-id-1 2 %s\n' 'foo\n' 'bar\n' @@ -450,7 +449,7 @@ class LowLevelKnitDataTests(TestCase): knit._read_records_iter_raw(records)) def test_uncompressed_data(self): - sha1sum = sha.new('foo\nbar\n').hexdigest() + sha1sum = osutils.sha('foo\nbar\n').hexdigest() txt = ('version rev-id-1 2 %s\n' 'foo\n' 'bar\n' @@ -470,7 +469,7 @@ class LowLevelKnitDataTests(TestCase): knit._read_records_iter_raw(records)) def test_corrupted_data(self): - sha1sum = sha.new('foo\nbar\n').hexdigest() + sha1sum = osutils.sha('foo\nbar\n').hexdigest() gz_txt = self.create_gz_content('version rev-id-1 2 %s\n' 'foo\n' 'bar\n' @@ -1641,7 +1640,7 @@ class TestStacking(KnitTests): key_basis = ('bar',) key_missing = ('missing',) test.add_lines(key, (), ['foo\n']) - key_sha1sum = sha.new('foo\n').hexdigest() + key_sha1sum = osutils.sha('foo\n').hexdigest() sha1s = test.get_sha1s([key]) self.assertEqual({key: key_sha1sum}, sha1s) self.assertEqual([], basis.calls) @@ -1649,7 +1648,7 @@ class TestStacking(KnitTests): # directly (rather than via text reconstruction) so that remote servers # etc don't have to answer with full content. basis.add_lines(key_basis, (), ['foo\n', 'bar\n']) - basis_sha1sum = sha.new('foo\nbar\n').hexdigest() + basis_sha1sum = osutils.sha('foo\nbar\n').hexdigest() basis.calls = [] sha1s = test.get_sha1s([key, key_missing, key_basis]) self.assertEqual({key: key_sha1sum, --- bzr-1.6.1/bzrlib/tests/repository_implementations/test_check_reconcile.py.orig 2008-09-05 22:12:54.000000000 +0200 +++ bzr-1.6.1/bzrlib/tests/repository_implementations/test_check_reconcile.py 2008-09-23 17:08:11.000000000 +0200 @@ -20,8 +20,6 @@ That is, tests for reconcile and check. """ -import sha - from bzrlib.inventory import Inventory, InventoryFile from bzrlib.revision import Revision from bzrlib.tests import TestNotApplicable @@ -98,7 +96,7 @@ class TestFileParentReconciliation(TestC entry.text_size = 0 if file_contents is None: file_contents = '%sline\n' % entry.revision - entry.text_sha1 = sha.sha(file_contents).hexdigest() + entry.text_sha1 = osutils.sha(file_contents).hexdigest() inv.add(entry) if make_file_version: repo.texts.add_lines((file_id, revision), --- bzr-1.6.1/bzrlib/tests/test_testament.py.orig 2008-09-05 22:12:58.000000000 +0200 +++ bzr-1.6.1/bzrlib/tests/test_testament.py 2008-09-23 17:09:57.000000000 +0200 @@ -19,8 +19,8 @@ # TODO: Testaments with x-bits import os -from sha import sha +from bzrlib.osutils import sha from bzrlib.tests import SymlinkFeature, TestCaseWithTransport from bzrlib.testament import Testament, StrictTestament, StrictTestament3 from bzrlib.transform import TreeTransform --- bzr-1.6.1/bzrlib/tests/http_utils.py.orig 2008-09-05 22:12:54.000000000 +0200 +++ bzr-1.6.1/bzrlib/tests/http_utils.py 2008-09-23 17:13:27.000000000 +0200 @@ -18,13 +18,13 @@ from cStringIO import StringIO import errno import md5 import re -import sha import socket import threading import time import urllib2 import urlparse +from bzrlib.osutils import sha from bzrlib import ( errors, tests, ++++++ bzr-U32removal.patch ++++++ --- bzrlib/tuned_gzip.py.orig 2008-09-12 22:22:58.000000000 +0200 +++ bzrlib/tuned_gzip.py 2008-09-12 22:23:48.000000000 +0200 @@ -21,7 +21,7 @@ # make GzipFile faster: import gzip -from gzip import U32, LOWU32, FEXTRA, FCOMMENT, FNAME, FHCRC +from gzip import FEXTRA, FCOMMENT, FNAME, FHCRC import sys import struct import zlib @@ -32,6 +32,19 @@ __all__ = ["GzipFile", "bytes_to_gzip"] +def U32(i): + """Return i as an unsigned integer, assuming it fits in 32 bits. + + If it's >= 2GB when viewed as a 32-bit unsigned int, return a long. + """ + if i < 0: + i += 1L << 32 + return i + +def LOWU32(i): + """Return the low-order 32 bits of an int, as a non-negative int.""" + return i & 0xFFFFFFFFL + def bytes_to_gzip(bytes, factory=zlib.compressobj, level=zlib.Z_DEFAULT_COMPRESSION, method=zlib.DEFLATED, width=-zlib.MAX_WBITS, mem=zlib.DEF_MEM_LEVEL, ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org