/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-22 13:59:33 UTC
  • mfrom: (5105 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5106.
  • Revision ID: jelmer@samba.org-20100322135933-7i7vyau8mvjoqvpf
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
        for node in bt.iter_all_entries():
457
457
            # Node is made up of:
458
458
            # (index, key, value, [references])
459
 
            refs_as_tuples = static_tuple.as_tuples(node[3])
 
459
            try:
 
460
                refs = node[3]
 
461
            except IndexError:
 
462
                refs_as_tuples = None
 
463
            else:
 
464
                refs_as_tuples = static_tuple.as_tuples(refs)
460
465
            as_tuple = (tuple(node[1]), node[2], refs_as_tuples)
461
466
            self.outf.write('%s\n' % (as_tuple,))
462
467
 
2433
2438
            raise errors.BzrCommandError(
2434
2439
                "bzr %s doesn't accept two revisions in different"
2435
2440
                " branches." % command_name)
2436
 
        rev1 = start_spec.in_history(branch)
 
2441
        if start_spec.spec is None:
 
2442
            # Avoid loading all the history.
 
2443
            rev1 = RevisionInfo(branch, None, None)
 
2444
        else:
 
2445
            rev1 = start_spec.in_history(branch)
2437
2446
        # Avoid loading all of history when we know a missing
2438
2447
        # end of range means the last revision ...
2439
2448
        if end_spec.spec is None:
5143
5152
               short_name='f',
5144
5153
               type=unicode),
5145
5154
        Option('output', short_name='o',
5146
 
               help='Write merge directive to this file; '
 
5155
               help='Write merge directive to this file or directory; '
5147
5156
                    'use - for stdout.',
5148
5157
               type=unicode),
5149
5158
        Option('strict',
5752
5761
                    self.outf.write("    <no hooks installed>\n")
5753
5762
 
5754
5763
 
 
5764
class cmd_remove_branch(Command):
 
5765
    """Remove a branch.
 
5766
 
 
5767
    This will remove the branch from the specified location but 
 
5768
    will keep any working tree or repository in place.
 
5769
 
 
5770
    :Examples:
 
5771
 
 
5772
      Remove the branch at repo/trunk::
 
5773
 
 
5774
        bzr remove-branch repo/trunk
 
5775
 
 
5776
    """
 
5777
 
 
5778
    takes_args = ["location?"]
 
5779
 
 
5780
    aliases = ["rmbranch"]
 
5781
 
 
5782
    def run(self, location=None):
 
5783
        if location is None:
 
5784
            location = "."
 
5785
        branch = Branch.open_containing(location)[0]
 
5786
        branch.bzrdir.destroy_branch()
 
5787
        
 
5788
 
5755
5789
class cmd_shelve(Command):
5756
5790
    """Temporarily set aside some changes from the current tree.
5757
5791