~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Patch Queue Manager
  • Date: 2012-08-28 21:17:31 UTC
  • mfrom: (6555.1.2 post-mortem)
  • Revision ID: pqm@pqm.ubuntu.com-20120828211731-5di1tveevpzcdtd9
(jelmer) Remove compatibility code for python 2.4 for post mortem. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
685
685
            if revision:
686
686
                if len(revision) != 1:
687
687
                    raise errors.BzrCommandError(gettext(
688
 
                        "Revision numbers only make sense for single "
689
 
                        "revisions, not ranges"))
 
688
                        "Tags can only be placed on a single revision, "
 
689
                        "not on a range"))
690
690
                revid = revision[0].as_revision_id(b)
691
691
            else:
692
692
                revid = b.last_revision()
1184
1184
            tree_to = None
1185
1185
            branch_to = Branch.open_containing(directory)[0]
1186
1186
            self.add_cleanup(branch_to.lock_write().unlock)
1187
 
            if show_base:
1188
 
                warning(gettext("No working tree, ignoring --show-base"))
 
1187
 
 
1188
        if tree_to is None and show_base:
 
1189
            raise errors.BzrCommandError(gettext("Need working tree for --show-base."))
1189
1190
 
1190
1191
        if local and not branch_to.get_bound_location():
1191
1192
            raise errors.LocalRequiresBoundBranch()
5140
5141
            Option('strict',
5141
5142
                   help='Produce a strict-format testament.')]
5142
5143
    takes_args = ['branch?']
5143
 
    encoding_type = 'exact'
5144
5144
    @display_command
5145
5145
    def run(self, branch=u'.', revision=None, long=False, strict=False):
5146
5146
        from bzrlib.testament import Testament, StrictTestament
5159
5159
            rev_id = revision[0].as_revision_id(b)
5160
5160
        t = testament_class.from_revision(b.repository, rev_id)
5161
5161
        if long:
5162
 
            self.outf.writelines(t.as_text_lines())
 
5162
            sys.stdout.writelines(t.as_text_lines())
5163
5163
        else:
5164
 
            self.outf.write(t.as_short_text())
 
5164
            sys.stdout.write(t.as_short_text())
5165
5165
 
5166
5166
 
5167
5167
class cmd_annotate(Command):
6727
6727
        ('cmd_version_info', [], 'bzrlib.cmd_version_info'),
6728
6728
        ('cmd_resolve', ['resolved'], 'bzrlib.conflicts'),
6729
6729
        ('cmd_conflicts', [], 'bzrlib.conflicts'),
6730
 
        ('cmd_ping', [], 'bzrlib.smart.ping'),
6731
6730
        ('cmd_sign_my_commits', [], 'bzrlib.commit_signature_commands'),
6732
6731
        ('cmd_verify_signatures', [], 'bzrlib.commit_signature_commands'),
6733
6732
        ('cmd_test_script', [], 'bzrlib.cmd_test_script'),