~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: 2007-07-31 05:10:59 UTC
  • mfrom: (2659.1.3 bzr-send)
  • Revision ID: pqm@pqm.ubuntu.com-20070731051059-q0z19zdpq7t76iex
rename "submit" to "send"

Show diffs side-by-side

added added

removed removed

Lines of Context:
3683
3683
            s.send_email(message)
3684
3684
 
3685
3685
 
3686
 
class cmd_submit(Command):
 
3686
class cmd_send(Command):
3687
3687
    """Create a merge-directive for submiting changes.
3688
3688
 
3689
3689
    A merge directive provides many things needed for requesting merges:
3714
3714
    _see_also = ['merge']
3715
3715
 
3716
3716
    takes_args = ['submit_branch?', 'public_branch?']
 
3717
 
3717
3718
    takes_options = [
3718
3719
        Option('no-bundle',
3719
3720
               help='Do not include a bundle in the merge directive.'),
3736
3737
            **kwargs):
3737
3738
        from bzrlib.revision import ensure_null, NULL_REVISION
3738
3739
        if output is None:
 
3740
            raise errors.BzrCommandError('File must be specified with'
 
3741
                                         ' --output')
 
3742
        elif output == '-':
3739
3743
            outfile = self.outf
3740
3744
        else:
3741
3745
            outfile = open(output, 'wb')
3773
3777
            base_revision_id = None
3774
3778
            if revision is not None:
3775
3779
                if len(revision) > 2:
3776
 
                    raise errors.BzrCommandError('bzr submit takes '
 
3780
                    raise errors.BzrCommandError('bzr send takes '
3777
3781
                        'at most two one revision identifiers')
3778
3782
                revision_id = revision[-1].in_history(branch).rev_id
3779
3783
                if len(revision) == 2:
3792
3796
                base_revision_id=base_revision_id)
3793
3797
            outfile.writelines(directive.to_lines())
3794
3798
        finally:
3795
 
            if output is not None:
 
3799
            if output != '-':
3796
3800
                outfile.close()
3797
3801
 
 
3802
 
3798
3803
class cmd_tag(Command):
3799
3804
    """Create a tag naming a revision.
3800
3805