Skip to content

Commit

Permalink
Add more debug lines to merge_dicts errors. (#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhearsum authored Oct 2, 2019
1 parent f4a5d02 commit 21e37f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions auslib/blobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ def merge_dicts(ancestor, left, right):
else:
if key in ancestor:
if key in left and key in right and ancestor[key] != left[key] and ancestor[key] != right[key]:
log.warning("Ancestor is: %s", ancestor)
log.warning("Left is: %s", left)
log.warning("Right is: %s", right)
raise ValueError("Cannot merge blobs: left and right are both changing '{}'".format(encoded_str_key))
if key in left and ancestor[key] != left.get(key):
result[key] = left[key]
Expand All @@ -118,6 +121,9 @@ def merge_dicts(ancestor, left, right):
result[key] = ancestor[key]
else:
if key in left and key in right and left[key] != right[key]:
log.warning("Ancestor is: %s", ancestor)
log.warning("Left is: %s", left)
log.warning("Right is: %s", right)
raise ValueError("Cannot merge blobs: left and right are both changing '{}'".format(encoded_str_key))
if key in left:
result[key] = left[key]
Expand Down

0 comments on commit 21e37f7

Please sign in to comment.