~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

Prevent losing data when reconfiguring to lightweight checkout
        (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
            changes = self.tree.changes_from(self.tree.basis_tree())
204
204
            if changes.has_changed():
205
205
                raise errors.UncommittedChanges(self.tree)
 
206
        if self._create_reference and self.local_branch is not None:
 
207
            reference_branch = branch.Branch.open(self._select_bind_location())
 
208
            if (reference_branch.last_revision() !=
 
209
                self.local_branch.last_revision()):
 
210
                raise errors.UnsyncedBranches(self.bzrdir, reference_branch)
206
211
 
207
212
    def _select_bind_location(self):
208
213
        """Select a location to bind or create a reference to.