/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

  • Committer: Aaron Bentley
  • Date: 2008-04-06 16:54:35 UTC
  • mto: This revision was merged to the branch mainline in revision 3380.
  • Revision ID: aaron@aaronbentley.com-20080406165435-cqhh3rg3gt1qzp11
Raise an error when converting a branch to a lightweight checkout loses data

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
            changes = self.tree.changes_from(self.tree.basis_tree())
169
169
            if changes.has_changed():
170
170
                raise errors.UncommittedChanges(self.tree)
 
171
        if self._create_reference and self.local_branch is not None:
 
172
            reference_branch = branch.Branch.open(self._select_bind_location())
 
173
            if (reference_branch.last_revision() !=
 
174
                self.local_branch.last_revision()):
 
175
                raise errors.UnsyncedBranches(self.bzrdir, reference_branch)
171
176
 
172
177
    def _select_bind_location(self):
173
178
        """Select a location to bind or create a reference to.