~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

Rework test_script a little bit.


Don't allow someone to request a stdin request to echo.
Echo never reads from stdin, it just echos its arguments.
You use 'cat' if you want to read from stdin.

A few other fixes because the tests were using filenames
that are actually illegal on Windows, rather than just
nonexistant.


Change the exception handling for commands so that
unknown errors don't get silently squashed and then
turn into hard-to-debug errors later.

test_script now passes on Windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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())