~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1028
1028
            if last_rev == _mod_revision.ensure_null(
1029
1029
                tree.branch.last_revision()):
1030
1030
                # may be up to date, check master too.
1031
 
                master = tree.branch.get_master_branch()
1032
1031
                if master is None or last_rev == _mod_revision.ensure_null(
1033
1032
                    master.last_revision()):
1034
1033
                    revno = tree.branch.revision_id_to_revno(last_rev)
3724
3723
            s.send_email(message)
3725
3724
 
3726
3725
 
3727
 
class cmd_submit(Command):
 
3726
class cmd_send(Command):
3728
3727
    """Create a merge-directive for submiting changes.
3729
3728
 
3730
3729
    A merge directive provides many things needed for requesting merges:
3755
3754
    _see_also = ['merge']
3756
3755
 
3757
3756
    takes_args = ['submit_branch?', 'public_branch?']
 
3757
 
3758
3758
    takes_options = [
3759
3759
        Option('no-bundle',
3760
3760
               help='Do not include a bundle in the merge directive.'),
3777
3777
            **kwargs):
3778
3778
        from bzrlib.revision import ensure_null, NULL_REVISION
3779
3779
        if output is None:
 
3780
            raise errors.BzrCommandError('File must be specified with'
 
3781
                                         ' --output')
 
3782
        elif output == '-':
3780
3783
            outfile = self.outf
3781
3784
        else:
3782
3785
            outfile = open(output, 'wb')
3814
3817
            base_revision_id = None
3815
3818
            if revision is not None:
3816
3819
                if len(revision) > 2:
3817
 
                    raise errors.BzrCommandError('bzr submit takes '
 
3820
                    raise errors.BzrCommandError('bzr send takes '
3818
3821
                        'at most two one revision identifiers')
3819
3822
                revision_id = revision[-1].in_history(branch).rev_id
3820
3823
                if len(revision) == 2:
3833
3836
                base_revision_id=base_revision_id)
3834
3837
            outfile.writelines(directive.to_lines())
3835
3838
        finally:
3836
 
            if output is not None:
 
3839
            if output != '-':
3837
3840
                outfile.close()
3838
3841
 
 
3842
 
3839
3843
class cmd_tag(Command):
3840
3844
    """Create a tag naming a revision.
3841
3845