122
122
self.old_tree = old_tree
123
123
self.new_tree = new_tree
125
def revid(self, tree, file_id):
125
def revid(self, tree, path):
127
path = tree.id2path(file_id)
128
except breezy.errors.NoSuchId:
127
return tree.get_file_revision(path)
128
except breezy.errors.NoSuchFile:
131
return tree.get_file_revision(path)
133
def report(self, file_id, paths, versioned, renamed, modified,
131
if breezy_version >= (3, 1):
132
def report(self, paths, versioned, renamed, modified,
135
paths, versioned, renamed, modified,
138
def report(self, file_id, paths, versioned, renamed, modified,
141
paths, versioned, renamed, modified,
144
def _report(self, paths, versioned, renamed, modified, exe_change, kind):
135
145
if modified not in ('unchanged', 'kind changed'):
136
146
if versioned == 'removed':
137
147
filename = rich_filename(paths[0], kind[0])
139
149
filename = rich_filename(paths[1], kind[1])
140
150
self.text_changes.append(util.Container(
141
filename=filename, file_id=file_id,
142
old_revision=self.revid(self.old_tree, file_id),
143
new_revision=self.revid(self.new_tree, file_id)))
152
old_revision=self.revid(self.old_tree, paths[0]),
153
new_revision=self.revid(self.new_tree, paths[1]),
144
156
if versioned == 'added':
145
157
self.added.append(util.Container(
146
158
filename=rich_filename(paths[1], kind), kind=kind[1]))