~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

  • Committer: Martin Pool
  • Date: 2010-04-01 04:41:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5128.
  • Revision ID: mbp@sourcefrog.net-20100401044118-shyctqc02ob08ngz
ignore .testrepository

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
265
265
 
266
266
    def _check(self):
267
267
        """Raise if reconfiguration would destroy local changes"""
268
 
        if self._destroy_tree:
269
 
            # XXX: What about pending merges ? -- vila 20090629
270
 
            if self.tree.has_changes(self.tree.basis_tree()):
 
268
        if self._destroy_tree and self.tree.has_changes():
271
269
                raise errors.UncommittedChanges(self.tree)
272
270
        if self._create_reference and self.local_branch is not None:
273
271
            reference_branch = branch.Branch.open(self._select_bind_location())
370
368
            local_branch = self.local_branch
371
369
        if self._create_reference:
372
370
            format = branch.BranchReferenceFormat().initialize(self.bzrdir,
373
 
                reference_branch)
 
371
                target_branch=reference_branch)
374
372
        if self._destroy_tree:
375
373
            self.bzrdir.destroy_workingtree()
376
374
        if self._create_tree: