this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cartool diff: print metadata

+11
+11
src/atmst/cartool.py
··· 98 98 write_block(carfile_out, bytes(v) + bs.get_block(bytes(v))) 99 99 dedup.add(v) 100 100 101 + def _delta_str(a: str, b: str): 102 + if a == b: 103 + return f"{a} == {b}" 104 + return f"{a} -> {b}" 105 + 101 106 def print_record_diff(car_a: str, car_b: str): 102 107 bs_a, commit_a, _ = open_car(car_a) 103 108 bs_b, commit_b, _ = open_car(car_b) 109 + print(f"Repo: {_delta_str(commit_a['did'], commit_b['did'])}") 110 + print(f"Revision: {_delta_str(commit_a['rev'], commit_b['rev'])}") 111 + print(f"Commit: {_delta_str(bs_a.car_root.encode('base32'), bs_b.car_root.encode('base32'))}") 112 + print(f"MST root: {_delta_str(commit_a['data'].encode('base32'), commit_b['data'].encode('base32'))}") 113 + print("") 114 + print("Record delta:") 104 115 bs = OverlayBlockStore(bs_a, bs_b) 105 116 ns = NodeStore(bs) 106 117 mst_created, mst_deleted = mst_diff(ns, commit_a["data"], commit_b["data"])