repo_diff_trees.py compares two repo source trees and outputs reports on the findings.
The ouput is in CSV and is easily consumable in a spreadsheet.
In addition to importing to a spreadsheet, you can also create your own Data Studio dashboard like this one.
If you wish to create your own dashboard follow the instructions below:
mkdir android-8.0.0_r1 cd android-8.0.0_r1 repo init \ --manifest-url=https://android.googlesource.com/platform/manifest \ --manifest-branch=android-8.0.0_r1 # Adjust the number of parallel jobs to your needs repo sync --current-branch --no-clone-bundle --no-tags --jobs=8 cd .. mkdir android-8.0.0_r11 cd android-8.0.0_r11 repo init \ --manifest-url=https://android.googlesource.com/platform/manifest \ --manifest-branch=android-8.0.0_r11 # Adjust the number of parallel jobs to your needs repo sync --current-branch --no-clone-bundle --no-tags --jobs=8 cd ..
python repo_diff_trees.py --exclusions_file=android_exclusions.txt \ android-8.0.0_r1 android-8.0.0_r11
repo_diff_trees.py goes through several stages when comparing two repo source trees:
The first two steps are self explanatory. The method of finding commits only in B is explaned below.
After matching up projects in both source tree and diffing, the last stage is to iterate through each project matching pair and find the commits that exist in the downstream project (B) but not the upstream project (A).
‘git cherry’ is a useful tool that finds changes which exist in one branch but not another. It does so by not only by finding which commits that were merged to both branches, but also by matching cherry picked commits.
However, there are many instances where a change in one branch can have an equivalent in another branch without being a merge or a cherry pick. Some examples are:
Cherry pick will not recognize these commits as having an equivalent yet they clearly do.
This is addressed in two steps:
The method described above has proven effective on Android source trees. It does have shortcomings.