~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2011-06-18 13:57:17 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5987.
  • Revision ID: jelmer@samba.org-20110618135717-wo0eadh0dydpbemc
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        result.old_revno, result.old_revid = self.target.last_revision_info()
164
164
        self.source.lock_read()
165
165
        try:
 
166
            graph = self.source.repository.get_graph()
166
167
            # This just handles simple cases, but that's good enough for tests
167
168
            my_history = self.target.revision_history()
168
169
            if stop_revision is None:
169
170
                stop_revision = self.source.last_revision()
170
 
            their_history = list(
171
 
                self.source.repository.iter_reverse_revision_history(stop_revision))
 
171
            their_history = list(graph.iter_lefthand_ancestry(stop_revision,
 
172
                (revision.NULL_REVISION,)))
172
173
            their_history.reverse()
173
174
            if their_history[:min(len(my_history), len(their_history))] != my_history:
174
175
                raise errors.DivergedBranches(self.target, self.source)
181
182
                    return (tree.get_file(file_id), None)
182
183
                tree.get_file_with_stat = get_file_with_stat
183
184
                new_revid = self.target.mapping.revision_id_foreign_to_bzr(
184
 
                    (str(rev.timestamp), str(rev.timezone), 
 
185
                    (str(rev.timestamp), str(rev.timezone),
185
186
                        str(self.target.revno())))
186
187
                parent_revno, parent_revid= self.target.last_revision_info()
187
188
                if parent_revid == revision.NULL_REVISION: