Rev 4507: Be more explicit about the default value for push|send --strict. in file:///home/vila/src/bzr/experimental/bool-config-option/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jul 2 10:07:23 BST 2009
At file:///home/vila/src/bzr/experimental/bool-config-option/
------------------------------------------------------------
revno: 4507
revision-id: v.ladeuil+lp at free.fr-20090702090722-m7evvdlgz7pxg0xo
parent: v.ladeuil+lp at free.fr-20090702090314-xzzq2108489y6l4g
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bool-config-option
timestamp: Thu 2009-07-02 11:07:22 +0200
message:
Be more explicit about the default value for push|send --strict.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-07-02 09:03:14 +0000
+++ b/bzrlib/builtins.py 2009-07-02 09:07:22 +0000
@@ -1098,14 +1098,14 @@
_unused) = bzrdir.BzrDir.open_containing_tree_or_branch(directory)
if strict is None:
strict = br_from.get_config().get_user_option_as_bool('push_strict')
+ if strict is None: strict = True # default value
# Get the tip's revision_id
revision = _get_one_revision('push', revision)
if revision is not None:
revision_id = revision.in_history(br_from).rev_id
else:
revision_id = None
- if (tree is not None and revision_id is None
- and (strict is None or strict)): # Default to True:
+ if strict and tree is not None and revision_id is None:
changes = tree.changes_from(tree.basis_tree())
if changes.has_changed() or len(tree.get_parent_ids()) > 1:
raise errors.UncommittedChanges(
=== modified file 'bzrlib/send.py'
--- a/bzrlib/send.py 2009-07-02 09:03:14 +0000
+++ b/bzrlib/send.py 2009-07-02 09:07:22 +0000
@@ -110,7 +110,8 @@
if strict is None:
strict = branch.get_config(
).get_user_option_as_bool('send_strict')
- if tree is not None and (strict is None or strict):
+ if strict is None: strict = True # default value
+ if strict and tree is not None:
changes = tree.changes_from(tree.basis_tree())
if changes.has_changed() or len(tree.get_parent_ids()) > 1:
raise errors.UncommittedChanges(
More information about the bazaar-commits
mailing list