~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        branch.BzrBranch6.__init__(self, _format, _control_files, a_bzrdir,
102
102
            *args, **kwargs)
103
103
 
104
 
    def _get_checkout_format(self, lightweight=False):
 
104
    def _get_checkout_format(self):
105
105
        """Return the most suitable metadir for a checkout of this branch.
106
106
        Weaves are used if this branch's repository uses weaves.
107
107
        """
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()
167
166
            # This just handles simple cases, but that's good enough for tests
168
167
            my_history = self.target.revision_history()
169
168
            if stop_revision is None:
170
169
                stop_revision = self.source.last_revision()
171
 
            their_history = list(graph.iter_lefthand_ancestry(stop_revision,
172
 
                (revision.NULL_REVISION,)))
 
170
            their_history = list(
 
171
                self.source.repository.iter_reverse_revision_history(stop_revision))
173
172
            their_history.reverse()
174
173
            if their_history[:min(len(my_history), len(their_history))] != my_history:
175
174
                raise errors.DivergedBranches(self.target, self.source)
182
181
                    return (tree.get_file(file_id), None)
183
182
                tree.get_file_with_stat = get_file_with_stat
184
183
                new_revid = self.target.mapping.revision_id_foreign_to_bzr(
185
 
                    (str(rev.timestamp), str(rev.timezone),
 
184
                    (str(rev.timestamp), str(rev.timezone), 
186
185
                        str(self.target.revno())))
187
186
                parent_revno, parent_revid= self.target.last_revision_info()
188
187
                if parent_revid == revision.NULL_REVISION: