/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/test_foreign.py

Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                    parent_revids = []
204
204
                else:
205
205
                    parent_revids = [parent_revid]
206
 
                builder = self.target.get_commit_builder(parent_revids, 
 
206
                builder = self.target.get_commit_builder(parent_revids,
207
207
                        self.target.get_config_stack(), rev.timestamp,
208
208
                        rev.timezone, rev.committer, rev.properties,
209
209
                        new_revid)
210
210
                try:
211
211
                    parent_tree = self.target.repository.revision_tree(
212
212
                        parent_revid)
213
 
                    for path, ie in tree.iter_entries_by_dir():
214
 
                        new_ie = ie.copy()
215
 
                        new_ie.revision = None
216
 
                        builder.record_entry_contents(new_ie, 
217
 
                            [parent_tree.root_inventory],
218
 
                            path, tree, 
219
 
                            (ie.kind, ie.text_size, ie.executable, ie.text_sha1))
 
213
                    iter_changes = tree.iter_changes(parent_tree)
 
214
                    list(builder.record_iter_changes(
 
215
                        tree, parent_revid, iter_changes))
220
216
                    builder.finish_inventory()
221
217
                except:
222
218
                    builder.abort()
223
219
                    raise
224
220
                revidmap[revid] = builder.commit(rev.message)
225
 
                self.target.set_last_revision_info(parent_revno+1, 
 
221
                self.target.set_last_revision_info(parent_revno+1,
226
222
                    revidmap[revid])
227
 
                trace.mutter('lossily pushed revision %s -> %s', 
 
223
                trace.mutter('lossily pushed revision %s -> %s',
228
224
                    revid, revidmap[revid])
229
225
        finally:
230
226
            self.source.unlock()