I have an open revision in Phabricator (with Git), and I submitted a diff to this revision, with the arc diff
command.
The problem is that this diff is bad, and so I would like to undo it and to come back to the previous diff.
Do you know how can I do please?
You can create a diff out of an arbitrary patch file by using --raw and piping it to stdin. In most cases this will only create a diff, not a revision. You can use the web UI to create a revision from the diff, or update an existing revision.
apply changes in a revision to the working copy with arc patch. download a patch from Differential with arc export. update Git commit messages after review with arc amend. commit SVN changes with arc commit.
I often make the mistake of diff'ing against the wrong branch.
The first step is to undo the diff. We can't kill the diff from the revision history, but we can revert it.
$ arc patch --diff <diff_id> # last good diff, creates <arcpatch-branch>
$ arc diff --update <revision_id> <arcpatch-branch> # "reverts" the offending diffs to the current state
At this point your revision is back to its original state. If you want to perform the diff again then do what you normally do. Checkout the branch with the changes intended for the diff and then perform the diff.
$ git checkout <new_branch>
$ arc diff <source_branch> # new_branch has changes that is intended to be merged into source_branch
Credit to altendky who listed most of these steps. However, the revision
flag he referenced no longer exists and I also wanted the steps to be listed a bit more clearly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With