~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Andrew Bennetts
  • Date: 2009-11-16 05:57:00 UTC
  • mto: This revision was merged to the branch mainline in revision 5032.
  • Revision ID: andrew.bennetts@canonical.com-20091116055700-lzlw30496263bz49
Fix bug introduced by the change to take multiple locations, and add a test for multiple locations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
454
454
        ]
455
455
 
456
456
    def run(self, location_list, force=False):
457
 
 
458
457
        if not location_list:
459
458
            location_list=['.']
460
459
 
472
471
                if (working.has_changes()):
473
472
                    raise errors.UncommittedChanges(working)
474
473
 
475
 
                working_path = working.bzrdir.root_transport.base
476
 
                branch_path = working.branch.bzrdir.root_transport.base
477
 
                if working_path != branch_path:
478
 
                    raise errors.BzrCommandError("You cannot remove the working tree"
479
 
                                                 " from a lightweight checkout")
 
474
            working_path = working.bzrdir.root_transport.base
 
475
            branch_path = working.branch.bzrdir.root_transport.base
 
476
            if working_path != branch_path:
 
477
                raise errors.BzrCommandError("You cannot remove the working tree"
 
478
                                             " from a lightweight checkout")
480
479
 
481
 
                d.destroy_workingtree()
 
480
            d.destroy_workingtree()
482
481
 
483
482
 
484
483
class cmd_revno(Command):