~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-15 08:35:53 UTC
  • mfrom: (4536.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090715083553-ssotnv68cr0x5yxr
(vila) Support boolean variables in configuration files and UI queries

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
                base_revision_id = revision[0].as_revision_id(branch)
109
109
        if revision_id is None:
110
110
            if strict is None:
111
 
                strict = branch.get_config().get_user_option('send_strict')
112
 
                if strict is not None:
113
 
                    # FIXME: This should be better supported by config
114
 
                    # -- vila 20090626
115
 
                    bools = dict(yes=True, no=False, on=True, off=False,
116
 
                                 true=True, false=False)
117
 
                    try:
118
 
                        strict = bools[strict.lower()]
119
 
                    except KeyError:
120
 
                        strict = None
121
 
            if tree is not None and (strict is None or strict):
 
111
                strict = branch.get_config(
 
112
                    ).get_user_option_as_bool('send_strict')
 
113
            if strict is None: strict = True # default value
 
114
            if strict and tree is not None:
122
115
                if (tree.has_changes(tree.basis_tree())
123
116
                    or len(tree.get_parent_ids()) > 1):
124
117
                    raise errors.UncommittedChanges(