~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-07-02 09:07:22 UTC
  • mto: (4536.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4537.
  • Revision ID: v.ladeuil+lp@free.fr-20090702090722-m7evvdlgz7pxg0xo
Be more explicit about the default value for push|send --strict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1098
1098
         _unused) = bzrdir.BzrDir.open_containing_tree_or_branch(directory)
1099
1099
        if strict is None:
1100
1100
            strict = br_from.get_config().get_user_option_as_bool('push_strict')
 
1101
        if strict is None: strict = True # default value
1101
1102
        # Get the tip's revision_id
1102
1103
        revision = _get_one_revision('push', revision)
1103
1104
        if revision is not None:
1104
1105
            revision_id = revision.in_history(br_from).rev_id
1105
1106
        else:
1106
1107
            revision_id = None
1107
 
        if (tree is not None and revision_id is None
1108
 
            and (strict is None or strict)): # Default to True:
 
1108
        if strict and tree is not None and revision_id is None:
1109
1109
            changes = tree.changes_from(tree.basis_tree())
1110
1110
            if changes.has_changed() or len(tree.get_parent_ids()) > 1:
1111
1111
                raise errors.UncommittedChanges(