~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v09.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-04 18:59:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070504185936-1mjdoqmtz74xe5mg
A C implementation of _fields_to_entry_0_parents drops the time from 400ms to 330ms for a 21k-entry tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from bzrlib.bundle.serializer import _get_bundle_header
 
17
from bzrlib.bundle.serializer import BUNDLE_HEADER
18
18
from bzrlib.bundle.serializer.v08 import BundleSerializerV08, BundleReader
19
19
from bzrlib.testament import StrictTestament3
20
20
from bzrlib.bundle.bundle_data import BundleInfo
38
38
    def _write_main_header(self):
39
39
        """Write the header for the changes"""
40
40
        f = self.to_file
41
 
        f.write(_get_bundle_header('0.9') + '#\n')
 
41
        f.write(BUNDLE_HEADER + '0.9\n#\n')
42
42
 
43
43
    def _testament_sha1(self, revision_id):
44
44
        return StrictTestament3.from_revision(self.source,