Reviewboard RBTools:获取已从不同差异更改的文件
Reviewboard RBTools: get files that have changed from different diff
假设我有一个包含 10 个文件的审核请求
从 diff 1 和 2,我只更改了 1 个文件
client = RBClient()
root = client.get_root()
files = root.get_files(review_request_id=1, diff_revision=1)
files2 = root.get_files(review_request_id=1, diff_revision=2)
以上代码显示相同数量的文件len(files) == len(files2)
如何才能只获取diff 2中修改过的文件?
我最终获得了每个差异的文件并比较了内容
curFiles = root.get_files(review_request_id=1, diff_revision=2)
prevFiles = root.get_files(review_request_id=1, diff_revision=1)
for f in curFiles:
#compare f.get_patched_file() vs corresponding f.get_patched_file()
假设我有一个包含 10 个文件的审核请求 从 diff 1 和 2,我只更改了 1 个文件
client = RBClient()
root = client.get_root()
files = root.get_files(review_request_id=1, diff_revision=1)
files2 = root.get_files(review_request_id=1, diff_revision=2)
以上代码显示相同数量的文件len(files) == len(files2)
如何才能只获取diff 2中修改过的文件?
我最终获得了每个差异的文件并比较了内容
curFiles = root.get_files(review_request_id=1, diff_revision=2)
prevFiles = root.get_files(review_request_id=1, diff_revision=1)
for f in curFiles:
#compare f.get_patched_file() vs corresponding f.get_patched_file()