~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2005-08-10 16:02:38 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: abentley@panoramicfeedback.com-20050810160238-de95cd021dae7a02
Stopped using SourceFile in inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        if not self.ignore_zero:
91
91
            print "%d conflicts encountered.\n" % self.conflicts
92
92
            
93
 
class SourceFile(object):
94
 
    def __init__(self, path, id, present=None, isdir=None):
95
 
        self.path = path
96
 
        self.id = id
97
 
        self.present = present
98
 
        self.isdir = isdir
99
 
 
100
 
    def __repr__(self):
101
 
        return "SourceFile(%s, %s)" % (self.path, self.id)
102
 
 
103
93
def get_tree(treespec, temp_root, label):
104
94
    location, revno = treespec
105
95
    branch = find_branch(location)
127
117
    inventory = {}
128
118
    for file_id in tree.inventory:
129
119
        path = abspath(tree, file_id)
130
 
        inventory[path] = SourceFile(path, file_id)
 
120
        inventory[path] = tree.inventory[file_id]
131
121
    return inventory
132
122
 
133
123
 
150
140
    def get_file_sha1(self, id):
151
141
        return self.tree.get_file_sha1(id)
152
142
 
 
143
    def id2path(self, file_id):
 
144
        return self.tree.id2path(file_id)
 
145
 
 
146
    def has_id(self, file_id):
 
147
        return self.tree.has_id(file_id)
 
148
 
153
149
    def readonly_path(self, id):
154
150
        if id not in self.tree:
155
151
            return None