<div dir="ltr">Here's the repository.<div><a href="https://github.com/llvm-project/llvm-project-phab/branches">https://github.com/llvm-project/llvm-project-phab/branches</a></div><div><div>For now, it is updated manually.</div><div><br></div><div>* What is?</div><div>This fetches all open and visible differentials from <a href="https://reviews.llvm.org/">https://reviews.llvm.org/</a> via conduit API.</div><div>Based on Git monorepo, <a href="https://github.com/llvm-project/llvm-project-20170507">https://github.com/llvm-project/llvm-project-20170507</a> .</div><div><br></div><div>Closed diffs will be removed. git-fetch --prune will help.</div><div><br></div><div>* How to play?</div><div>Prerequisite: You are on <span class="inbox-inbox-Apple-converted-space"> </span><a href="https://github.com/llvm-project/llvm-project-20170507">https://github.com/llvm-project/llvm-project-20170507</a> </div><div>$ git remote add phab <a href="https://github.com/llvm-project/llvm-project-phab.git">https://github.com/llvm-project/llvm-project-phab.git</a></div><div>$ git fetch phab --prune</div><div><br></div><div>* How to abandon playing?</div><div>$ git remote rm phab</div><div><br></div><div>* Future plans</div><div>- Implement building topic branches with <a href="http://bb.pgr.jp/">http://bb.pgr.jp/</a></div><div>- Synthesize and provide "dev/trunk" with merging topic branches</div><div>- Interact with <a href="https://reviews.llvm.org/">https://reviews.llvm.org/</a> for building results</div><div><br></div><div>* Issues</div><div>- Not all diffs can be generated. They might have unknown changes in their parents.</div><div>- Changes are not cascaded unless each change points a preceding change.</div><div>- If diffs don't have "Modified" files but "New" files, branches cannot be made.</div><div>  Heuristics depends on "orig" context of diff.</div><div>- Due to lack of conduit API, this has to fetch whole diff with <a href="https://reviews.llvm.org/api/differential.querydiffs">https://reviews.llvm.org/api/differential.querydiffs</a></div><div>  It has hundreds kilobytes of changes if it is generated from full context diff.</div><div>  Therefore, I won't run this automatically.</div><div>  (Let me know if there's an expert of conduit API)</div><div>- Each diff's author doesn't have full fields. API can know his name but not his mailto.</div><div>  (I could retrieve possible fields in trunk with his name...)</div><div><br></div><div>* How this works?</div><div>This relies on many heuristics.</div><div>- If a diff is full-context, calculate its each hash as git blob.</div><div>- Traverse the tree and walk revisions and check blobs' hashes matching;</div><div>  1) Preceding diffs in the same topic</div><div>  2) Just the commit, if a diff knows SVN revision number</div><div>  3) The newest commit in trunk with git-log --before (changes' ctime)<br></div><div>  4) All visible branches with git-log --branches</div><div>  5) Walk down changes (1)-(4) to (ctime - 28 days)</div><div>  6) (Also if a diff isn't full-context) Try applying patches to an actual tree with git-apply</div></div><div><br></div><div>Arigato, Takumi</div></div>