~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to switch.py

  • Committer: Aaron Bentley
  • Date: 2007-08-16 03:30:21 UTC
  • mto: This revision was merged to the branch mainline in revision 576.
  • Revision ID: aaron.bentley@utoronto.ca-20070816033021-e9k6t6rj25ndlhrk
Allow zap --force to delete modified checkouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    along with this program; if not, write to the Free Software
17
17
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
from bzrlib.errors import BzrCommandError
19
 
from bzrlib.commands import Command, register_command
 
19
from bzrlib.commands import register_command
20
20
from bzrlib.branch import Branch, BranchFormat
21
21
from bzrlib.bzrdir import BzrDir, BzrDirFormat
22
22
from bzrlib.transport import get_transport
24
24
from bzrlib.trace import note
25
25
from bzrlib.workingtree import WorkingTree
26
26
 
27
 
class cmd_switch(Command):
 
27
from command import BzrToolsCommand
 
28
 
 
29
class cmd_switch(BzrToolsCommand):
28
30
    """Set the branch of a lightweight checkout and update."""
29
31
 
30
32
    takes_args = ['to_location']
94
96
        branch_format = BranchFormat.find_format(control)
95
97
        transport = control.get_branch_transport(None)
96
98
        branch = branch_format.open(control)
97
 
        location = transport.put('location', location)
 
99
        location = transport.put_bytes('location', location)