Skip to content

Interdiff web service #17

Description

@sun

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>[&timestamp=<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:

  1. Checkout HEAD@{"$timestamp"}
  2. curl $old > old.patch
  3. curl $new > new.patch
  4. interdiff old.patch new.patch && pass-through output (as-is)
  5. || 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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions