Page MenuHomePhabricator

Ability to undo a diff
Closed, WontfixPublic

Description

When a diff is uploaded to a wrong revision, it is currently a pain to undo it. The developer has to find the last uploaded diff for that revision, rebase it on upstream changes, and re-upload it to the revision. There should be a way to undo the diff upload.

Event Timeline

mbautin added a subscriber: mbautin.
epriestley triaged this task as Low priority.Apr 7 2012, 4:51 PM

Although I think this is a reasonable feature to have, it implies some UI and notification complexity to address a fairly rare need. As a workaround, at least with git, you can grab the commit hash from the "right" update, check that out locally, and then re-diff to "undo" (that is, you can skip the upstream/rebase step because git still has the old object, even if it's no longer reachable from any branch).

btrahan added a project: Differential.
rhinon added a subscriber: rhinon.Jul 1 2014, 6:13 PM
chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 3 2015, 4:41 AM
isfs added a subscriber: isfs.Apr 25 2016, 11:31 AM
epriestley closed this task as Wontfix.Mar 28 2017, 12:07 PM
epriestley claimed this task.

I'm going to close this because I think it no longer meets the modern requirements for a feature request (it was filed in 2012). In particular, I don't understand why this is a problem:

When a diff is uploaded to a wrong revision, it is currently a pain to undo it.

I believe this error should essentially never occur. If it does, I'd like to understand why and try to fix that first.

Particularly after T10967, any implementation of this should copy the older diff but assign it a new ID/PHID, not attempt to actually revert the state to point at the older diff. This probably gets us in less trouble across the board anyway, but DifferentialReviewer now tracks a significant amount of state which is bound to the diff PHID and assumes it never reverts.

However, I think that pathway is a rough one: it's hard (in the general case, impossible) for us to "copy" a diff to staging areas and run other submit-time arc hooks.

If you're still seeing users update the wrong revisions, feel free to file a new request with more details about what they did and what they were expecting to happen so we can try to remedy that.