~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Robert Collins
  • Date: 2009-08-04 04:36:34 UTC
  • mfrom: (4583 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4593.
  • Revision ID: robertc@robertcollins.net-20090804043634-2iu9wpcgs273i97s
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
from collections import deque
22
 
from cStringIO import StringIO
23
22
 
24
23
import bzrlib
25
24
from bzrlib import (
30
29
    osutils,
31
30
    revision as _mod_revision,
32
31
    rules,
33
 
    symbol_versioning,
34
32
    )
35
33
from bzrlib.decorators import needs_read_lock
36
 
from bzrlib.errors import BzrError, BzrCheckError, NoSuchId
 
34
from bzrlib.errors import BzrError, NoSuchId
37
35
from bzrlib import errors
38
 
from bzrlib.inventory import Inventory, InventoryFile
 
36
from bzrlib.inventory import InventoryFile
39
37
from bzrlib.inter import InterObject
40
38
from bzrlib.osutils import fingerprint_file
41
39
import bzrlib.revision
42
40
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
43
 
from bzrlib.trace import mutter, note
 
41
from bzrlib.trace import note
44
42
 
45
43
 
46
44
class Tree(object):
135
133
        return self.has_id(file_id)
136
134
 
137
135
    def has_or_had_id(self, file_id):
138
 
        if file_id == self.inventory.root.file_id:
139
 
            return True
140
136
        return self.inventory.has_id(file_id)
141
137
 
142
138
    def is_ignored(self, filename):
437
433
        raise NotImplementedError(self.annotate_iter)
438
434
 
439
435
    def _get_plan_merge_data(self, file_id, other, base):
440
 
        from bzrlib import merge, versionedfile
 
436
        from bzrlib import versionedfile
441
437
        vf = versionedfile._PlanMergeVersionedFile(file_id)
442
438
        last_revision_a = self._get_file_revision(file_id, vf, 'this:')
443
439
        last_revision_b = other._get_file_revision(file_id, vf, 'other:')
827
823
        new_pending = set()
828
824
        for file_id in pending:
829
825
            for tree in trees:
830
 
                if not tree.has_id(file_id):
 
826
                if not tree.has_or_had_id(file_id):
831
827
                    continue
832
828
                for child_id in tree.iter_children(file_id):
833
829
                    if child_id not in interesting_ids: