Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def init_repo(repo):
- repo = OSTree.Repo.new(Gio.File.new_for_path(repo))
- repo.open()
- return repo
- def diff_commits(args):
- repo = init_repo(args.repo)
- a = args.ref_a
- b = args.ref_b
- _, root_a, _ = repo.read_commit(a)
- _, root_b, _ = repo.read_commit(b)
- modified = []
- removed = []
- added = []
- OSTree.diff_dirs(OSTree.DiffFlags.NONE, root_a, root_b, modified, removed, added)
- print(root_a.get_root().get_contents_checksum())
- print(root_b.get_root().get_contents_checksum())
- print(modified, removed, added)
Advertisement
Add Comment
Please, Sign In to add comment