~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-22 11:39:16 UTC
  • mfrom: (4991.1.7 rmbranch)
  • Revision ID: pqm@pqm.ubuntu.com-20100322113916-cwzfq5olk75uzs20
(Jelmer) Add rmbranch command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5749
5749
                    self.outf.write("    <no hooks installed>\n")
5750
5750
 
5751
5751
 
 
5752
class cmd_remove_branch(Command):
 
5753
    """Remove a branch.
 
5754
 
 
5755
    This will remove the branch from the specified location but 
 
5756
    will keep any working tree or repository in place.
 
5757
 
 
5758
    :Examples:
 
5759
 
 
5760
      Remove the branch at repo/trunk::
 
5761
 
 
5762
        bzr remove-branch repo/trunk
 
5763
 
 
5764
    """
 
5765
 
 
5766
    takes_args = ["location?"]
 
5767
 
 
5768
    aliases = ["rmbranch"]
 
5769
 
 
5770
    def run(self, location=None):
 
5771
        if location is None:
 
5772
            location = "."
 
5773
        branch = Branch.open_containing(location)[0]
 
5774
        branch.bzrdir.destroy_branch()
 
5775
        
 
5776
 
5752
5777
class cmd_shelve(Command):
5753
5778
    """Temporarily set aside some changes from the current tree.
5754
5779