Commit da82482b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c3efda8d
...@@ -85,7 +85,7 @@ DEL = 'ø' ...@@ -85,7 +85,7 @@ DEL = 'ø'
def diff(d1, d2): # -> [] of (k,v) to change; DEL means del[k] def diff(d1, d2): # -> [] of (k,v) to change; DEL means del[k]
delta = [] delta = []
keys = set(d1.keys()) keys = set(d1.keys())
keys.union(d2.keys()) keys.update(d2.keys())
for k in sorted(keys): for k in sorted(keys):
v1 = d1.get(k, DEL) v1 = d1.get(k, DEL)
v2 = d2.get(k, DEL) v2 = d2.get(k, DEL)
...@@ -151,6 +151,8 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n): ...@@ -151,6 +151,8 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n):
diff12 = diff(kv1, kv2) # of (k,v) diff to go from kv1 to kv2 diff12 = diff(kv1, kv2) # of (k,v) diff to go from kv1 to kv2
diff21 = diff(kv2, kv1) # of (k,v) diff to go from kv2 to kv1 diff21 = diff(kv2, kv1) # of (k,v) diff to go from kv2 to kv1
print('diff12:', diff12)
print('diff21:', diff21)
maxdepth=2 # XXX -> 3? maxdepth=2 # XXX -> 3?
maxsplit=1 # XXX -> 2? maxsplit=1 # XXX -> 2?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment