~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

  • Committer: Martin Pool
  • Date: 2009-07-24 03:15:56 UTC
  • mfrom: (4565 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4566.
  • Revision ID: mbp@sourcefrog.net-20090724031556-5zyef6f1ixtn6r3z
merge news

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):
122
 
                changes = tree.changes_from(tree.basis_tree())
123
 
                if changes.has_changed() or len(tree.get_parent_ids()) > 1:
 
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:
 
115
                if (tree.has_changes(tree.basis_tree())
 
116
                    or len(tree.get_parent_ids()) > 1):
124
117
                    raise errors.UncommittedChanges(
125
118
                        tree, more='Use --no-strict to force the send.')
126
119
                if tree.last_revision() != tree.branch.last_revision():