~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Remove bzrlib/util/elementtree/ package (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Serializer factory for reading and writing bundles.
18
18
"""
19
19
 
20
 
import os
 
20
from __future__ import absolute_import
21
21
 
22
22
from bzrlib import (
23
23
    errors,
27
27
                                      _get_bundle_header,
28
28
                                     )
29
29
from bzrlib.bundle.serializer import binary_diff
30
 
from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)
 
30
from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo)
31
31
from bzrlib.diff import internal_diff
32
 
from bzrlib.osutils import pathjoin
33
32
from bzrlib.revision import NULL_REVISION
34
33
from bzrlib.testament import StrictTestament
35
34
from bzrlib.timestamp import (
36
35
    format_highres_date,
37
 
    unpack_highres_date,
38
 
)
 
36
    )
39
37
from bzrlib.textfile import text_file
40
38
from bzrlib.trace import mutter
41
39
 
263
261
 
264
262
        def do_diff(file_id, old_path, new_path, action, force_binary):
265
263
            def tree_lines(tree, require_text=False):
266
 
                if file_id in tree:
 
264
                if tree.has_id(file_id):
267
265
                    tree_file = tree.get_file(file_id)
268
266
                    if require_text is True:
269
267
                        tree_file = text_file(tree_file)