Hello community, here is the log from the commit of package bzr checked in at Fri Apr 25 15:46:28 CEST 2008. -------- --- bzr/bzr.changes 2008-03-26 16:24:24.000000000 +0100 +++ /mounts/work_src_done/STABLE/bzr/bzr.changes 2008-04-25 12:38:58.509320000 +0200 @@ -1,0 +2,7 @@ +Thu Apr 17 11:23:47 CEST 2008 - kssingvo@suse.de + +- upgrade to version 1.3.1: + * bugfix for crash when fetching revisions from a knit to pack + repository or vice versa using bzr:// + +------------------------------------------------------------------- Old: ---- bzr-1.3.tar.bz2 New: ---- bzr-1.3.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bzr.spec ++++++ --- /var/tmp/diff_new_pack.i18793/_old 2008-04-25 15:36:15.000000000 +0200 +++ /var/tmp/diff_new_pack.i18793/_new 2008-04-25 15:36:15.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package bzr (Version 1.3) +# spec file for package bzr (Version 1.3.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,7 +17,7 @@ Group: Development/Tools/Version Control AutoReqProv: on Summary: Friendly distributed version control system -Version: 1.3 +Version: 1.3.1 Release: 1 Source: http://bazaar-vcs.org/pkg/bzr-%{version}.tar.bz2 Url: http://bazaar-vcs.org/ @@ -60,6 +60,10 @@ %doc doc contrib tools BRANCH.TODO COPYING.txt NEWS README TODO %changelog +* Thu Apr 17 2008 kssingvo@suse.de +- upgrade to version 1.3.1: + * bugfix for crash when fetching revisions from a knit to pack + repository or vice versa using bzr:// * Wed Mar 26 2008 kssingvo@suse.de - upgrade to version 1.3: * many bugfixes and changes, see included NEWS file for details ++++++ bzr-1.3.tar.bz2 -> bzr-1.3.1.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bzr-1.3/bzr new/bzr-1.3.1/bzr --- old/bzr-1.3/bzr 2008-03-20 08:12:09.000000000 +0100 +++ new/bzr-1.3.1/bzr 2008-04-10 09:26:12.000000000 +0200 @@ -22,7 +22,7 @@ import sys # update this on each release -_script_version = (1, 3, 0) +_script_version = (1, 3, 1) if __doc__ is None: print "bzr does not support python -OO." diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bzr-1.3/bzrlib/__init__.py new/bzr-1.3.1/bzrlib/__init__.py --- old/bzr-1.3/bzrlib/__init__.py 2008-03-20 08:12:09.000000000 +0100 +++ new/bzr-1.3.1/bzrlib/__init__.py 2008-04-10 09:26:12.000000000 +0200 @@ -41,7 +41,7 @@ # Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a # releaselevel of 'dev' for unreleased under-development code. -version_info = (1, 3, 0, 'final', 0) +version_info = (1, 3, 1, 'final', 0) # API compatibility version: bzrlib is currently API compatible with 0.18. api_minimum_version = (0, 18, 0) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bzr-1.3/bzrlib/knit.py new/bzr-1.3.1/bzrlib/knit.py --- old/bzr-1.3/bzrlib/knit.py 2008-03-20 08:12:09.000000000 +0100 +++ new/bzr-1.3.1/bzrlib/knit.py 2008-04-10 09:26:13.000000000 +0200 @@ -2231,13 +2231,17 @@ def get_raw_records(self, memos_for_retrieval): """Get the raw bytes for a records. - :param memos_for_retrieval: An iterable containing the (thunk_flag, - index, start, end) memo for retrieving the bytes. - :return: An iterator over the bytes of the records. + :param memos_for_retrieval: An iterable of memos from the + _StreamIndex object identifying bytes to read; for these classes + they are (from_backing_knit, index, start, end) and can point to + either the backing knit or streamed data. + :return: An iterator yielding a byte string for each record in + memos_for_retrieval. """ # use a generator for memory friendliness - for thunk_flag, version_id, start, end in memos_for_retrieval: - if version_id is self.stream_index: + for from_backing_knit, version_id, start, end in memos_for_retrieval: + if not from_backing_knit: + assert version_id is self.stream_index yield self.data[start:end] continue # we have been asked to thunk. This thunking only occurs when @@ -2248,21 +2252,19 @@ # as desired. However, for now, this is sufficient. if self.orig_factory.__class__ != KnitPlainFactory: raise errors.KnitCorrupt( - self, 'Bad thunk request %r' % version_id) + self, 'Bad thunk request %r cannot be backed by %r' % + (version_id, self.orig_factory)) lines = self.backing_knit.get_lines(version_id) line_bytes = ''.join(lines) digest = sha_string(line_bytes) + # the packed form of the fulltext always has a trailing newline, + # even if the actual text does not, unless the file is empty. the + # record options including the noeol flag are passed through by + # _StreamIndex, so this is safe. if lines: if lines[-1][-1] != '\n': lines[-1] = lines[-1] + '\n' line_bytes += '\n' - orig_options = list(self.backing_knit._index.get_options(version_id)) - if 'fulltext' not in orig_options: - if 'line-delta' not in orig_options: - raise errors.KnitCorrupt(self, - 'Unknown compression method %r' % orig_options) - orig_options.remove('line-delta') - orig_options.append('fulltext') # We want plain data, because we expect to thunk only to allow text # extraction. size, bytes = self.backing_knit._data._record_to_data(version_id, @@ -2320,8 +2322,9 @@ :return: A dict of version_id:(index_memo, compression_parent, parents, record_details). index_memo - opaque structure to pass to read_records to extract the raw - data + opaque memo that can be passed to _StreamAccess.read_records + to extract the raw data; for these classes it is + (from_backing_knit, index, start, end) compression_parent Content that this record is built upon, may be None parents @@ -2339,23 +2342,22 @@ continue parent_ids = self.get_parents_with_ghosts(version_id) noeol = ('no-eol' in self.get_options(version_id)) + index_memo = self.get_position(version_id) + from_backing_knit = index_memo[0] + if from_backing_knit: + # texts retrieved from the backing knit are always full texts + method = 'fulltext' if method == 'fulltext': compression_parent = None else: compression_parent = parent_ids[0] - index_memo = self.get_position(version_id) result[version_id] = (index_memo, compression_parent, parent_ids, (method, noeol)) return result def get_method(self, version_id): """Return compression method of specified version.""" - try: - options = self._by_version[version_id][0] - except KeyError: - # Strictly speaking this should check in the backing knit, but - # until we have a test to discriminate, this will do. - return self.backing_index.get_method(version_id) + options = self.get_options(version_id) if 'fulltext' in options: return 'fulltext' elif 'line-delta' in options: @@ -2371,7 +2373,18 @@ try: return self._by_version[version_id][0] except KeyError: - return self.backing_index.get_options(version_id) + orig_options = self.backing_index.get_options(version_id) + if 'fulltext' in orig_options: + pass + elif 'line-delta' in orig_options: + orig_options = orig_options[:] + # Texts from the backing knit are always returned from the stream + # as full texts + orig_options.remove('line-delta') + orig_options.append('fulltext') + else: + raise errors.KnitIndexUnknownMethod(self, options) + return orig_options def get_parents_with_ghosts(self, version_id): """Return parents of specified version with ghosts.""" @@ -2387,8 +2400,10 @@ coordinates into that (as index_memo's are opaque outside the index and matching access class). - :return: a tuple (thunk_flag, index, start, end). If thunk_flag is - False, index will be self, otherwise it will be a version id. + :return: a tuple (from_backing_knit, index, start, end) that can + be passed e.g. to get_raw_records. + If from_backing_knit is False, index will be self, otherwise it + will be a version id. """ try: start, end = self._by_version[version_id][1] diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bzr-1.3/NEWS new/bzr-1.3.1/NEWS --- old/bzr-1.3/NEWS 2008-03-20 08:12:08.000000000 +0100 +++ new/bzr-1.3.1/NEWS 2008-04-10 09:26:12.000000000 +0200 @@ -5,6 +5,24 @@ .. contents:: + +bzr 1.3.1 2008-04-09 +-------------------- + + No changes from 1.3.1rc1. + + +bzr 1.3rc1 2008-04-04 +--------------------- + + BUG FIXES: + + * Fix a bug causing a ValueError crash in ``parse_line_delta_iter`` when + fetching revisions from a knit to pack repository or vice versa using + bzr:// (including over http or ssh). + (#208418, Andrew Bennetts, Martin Pool, Robert Collins) + + bzr 1.3 2008-03-20 ------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org