/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: Canonical.com Patch Queue Manager
  • Date: 2009-07-01 19:06:14 UTC
  • mfrom: (4498.2.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090701190614-ypbryxq02zxbf5kv
Add a --strict option to send

Show diffs side-by-side

added added

removed removed

Lines of Context:
1080
1080
            type=unicode),
1081
1081
        Option('strict',
1082
1082
               help='Refuse to push if there are uncommitted changes in'
1083
 
               ' the working tree.'),
 
1083
               ' the working tree, --no-strict disables the check.'),
1084
1084
        ]
1085
1085
    takes_args = ['location?']
1086
1086
    encoding_type = 'replace'
4971
4971
               help='Write merge directive to this file; '
4972
4972
                    'use - for stdout.',
4973
4973
               type=unicode),
 
4974
        Option('strict',
 
4975
               help='Refuse to send if there are uncommitted changes in'
 
4976
               ' the working tree, --no-strict disables the check.'),
4974
4977
        Option('mail-to', help='Mail the request to this address.',
4975
4978
               type=unicode),
4976
4979
        'revision',
4977
4980
        'message',
4978
4981
        Option('body', help='Body for the email.', type=unicode),
4979
4982
        RegistryOption('format',
4980
 
                       help='Use the specified output format.', 
4981
 
                       lazy_registry=('bzrlib.send', 'format_registry'))
 
4983
                       help='Use the specified output format.',
 
4984
                       lazy_registry=('bzrlib.send', 'format_registry')),
4982
4985
        ]
4983
4986
 
4984
4987
    def run(self, submit_branch=None, public_branch=None, no_bundle=False,
4985
4988
            no_patch=False, revision=None, remember=False, output=None,
4986
 
            format=None, mail_to=None, message=None, body=None, **kwargs):
 
4989
            format=None, mail_to=None, message=None, body=None,
 
4990
            strict=None, **kwargs):
4987
4991
        from bzrlib.send import send
4988
4992
        return send(submit_branch, revision, public_branch, remember,
4989
 
                         format, no_bundle, no_patch, output,
4990
 
                         kwargs.get('from', '.'), mail_to, message, body,
4991
 
                         self.outf)
 
4993
                    format, no_bundle, no_patch, output,
 
4994
                    kwargs.get('from', '.'), mail_to, message, body,
 
4995
                    self.outf,
 
4996
                    strict=strict)
4992
4997
 
4993
4998
 
4994
4999
class cmd_bundle_revisions(cmd_send):
5038
5043
               type=unicode),
5039
5044
        Option('output', short_name='o', help='Write directive to this file.',
5040
5045
               type=unicode),
 
5046
        Option('strict',
 
5047
               help='Refuse to bundle revisions if there are uncommitted'
 
5048
               ' changes in the working tree, --no-strict disables the check.'),
5041
5049
        'revision',
5042
5050
        RegistryOption('format',
5043
5051
                       help='Use the specified output format.',
5051
5059
 
5052
5060
    def run(self, submit_branch=None, public_branch=None, no_bundle=False,
5053
5061
            no_patch=False, revision=None, remember=False, output=None,
5054
 
            format=None, **kwargs):
 
5062
            format=None, strict=None, **kwargs):
5055
5063
        if output is None:
5056
5064
            output = '-'
5057
5065
        from bzrlib.send import send
5058
5066
        return send(submit_branch, revision, public_branch, remember,
5059
5067
                         format, no_bundle, no_patch, output,
5060
5068
                         kwargs.get('from', '.'), None, None, None,
5061
 
                         self.outf)
 
5069
                         self.outf, strict=strict)
5062
5070
 
5063
5071
 
5064
5072
class cmd_tag(Command):