~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

(vila) Migrate more branch config options to config stacks. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    branch.lock_write()
50
50
    try:
51
51
        if output is None:
52
 
            config = branch.get_config()
53
52
            if mail_to is None:
54
 
                mail_to = config.get_user_option('submit_to')
55
 
            mail_client = config.get_mail_client()
 
53
                mail_to = branch.get_config_stack().get('submit_to')
 
54
            mail_client = branch.get_config().get_mail_client()
56
55
            if (not getattr(mail_client, 'supports_body', False)
57
56
                and body is not None):
58
57
                raise errors.BzrCommandError(gettext(
87
86
            possible_transports=possible_transports)
88
87
        possible_transports.append(submit_branch.bzrdir.root_transport)
89
88
        if mail_to is None or format is None:
90
 
            submit_config = submit_branch.get_config()
91
89
            if mail_to is None:
92
 
                mail_to = submit_config.get_user_option("child_submit_to")
 
90
                mail_to = submit_branch.get_config_stack().get(
 
91
                    'child_submit_to')
93
92
            if format is None:
94
93
                formatname = submit_branch.get_child_submit_format()
95
94
                try:
96
95
                    format = format_registry.get(formatname)
97
96
                except KeyError:
98
 
                    raise errors.BzrCommandError(gettext("No such send format '%s'.") % 
99
 
                                                 formatname)
 
97
                    raise errors.BzrCommandError(
 
98
                        gettext("No such send format '%s'.") % formatname)
100
99
 
101
100
        stored_public_branch = branch.get_public_branch()
102
101
        if public_branch is None: