Lacking proper support/usage of branches/patch-serials, other Drupal core contributors/reviewers become more and more mad of asking everyone for interdiffs - even for the most silly patches.
Objective
- Create an interdiff web service on dreditor.org.
- Preferably in node.js or perhaps even proxied into bash/shell (just not PHP, please).
→ Instead of manually creating interdiffs, generate them automatically.
Dreditor needs to expose links, but that's a different topic.
Requirements
- Unless internal mechanics of
interdiff are re-implemented differently:
interdiff binary (GNU diffutils)
- git clone of Drupal core
diff binary (fallback)
API
Synopsis:
/interdiff?old=<uri>&new=<uri>[×tamp=<unix_timestamp>]
Parameters:
old: URI to first diff file.
new: URI to second diff file.
timestamp: Optional git repository checkout date (typically post date of new). If omitted, checkout defaults to now/latest HEAD.
Logic:
- Checkout
HEAD@{"$timestamp"}
curl $old > old.patch
curl $new > new.patch
interdiff old.patch new.patch && pass-through output (as-is)
- || fall back to
diff -up0 old.patch new.patch (diff of diffs)
Creating this issue "ahead of time". Didn't study yet whether it would be feasible to re-implement interdiff in pure JS. (Theoretically not much harder than "formatting" a diff, but not verified.)
Lacking proper support/usage of branches/patch-serials, other Drupal core contributors/reviewers become more and more mad of asking everyone for interdiffs - even for the most silly patches.
Objective
→ Instead of manually creating interdiffs, generate them automatically.
Dreditor needs to expose links, but that's a different topic.
Requirements
interdiffare re-implemented differently:interdiffbinary (GNU diffutils)diffbinary (fallback)API
Synopsis:
Parameters:
old: URI to first diff file.new: URI to second diff file.timestamp: Optional git repository checkout date (typically post date ofnew). If omitted, checkout defaults to now/latest HEAD.Logic:
HEAD@{"$timestamp"}curl $old > old.patchcurl $new > new.patchinterdiff old.patch new.patch&& pass-through output (as-is)diff -up0 old.patch new.patch(diff of diffs)Creating this issue "ahead of time". Didn't study yet whether it would be feasible to re-implement
interdiffin pure JS. (Theoretically not much harder than "formatting" a diff, but not verified.)