moz-phab creates Phabricator diffs from currently checked out commit instead of the actual commit
Categories
(Conduit :: moz-phab, defect)
Tracking
(Not tracked)
People
(Reporter: bthrall, Assigned: shtrom)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
moz-phab version (from moz-phab version
): MozPhab 1.8.0 (Python 3.10.12, Linux)
When I run moz-phab submit
from the last commit in a stack of commits, it sends incorrect diffs to Phabricator. Instead of the diff that I see in each commit, the Phabricator diff looks like the differences between the currently checked out commit in my working directory and the commit for the Phabricator patch.
For example, see D218444. This diff was submitted with my working directory checked out to D226717 and includes all the changes from D218444 through D226717. It should only include the changes for D218444 (see here).
The local commit message seems to correctly refer to the Phabricator patch because I see updates in Phabricator when I run moz-phab submit
:
Bug 1724236 - Move profiler label and JSAutoRealm out of JSExecutionContext r=arai!
Differential Revision: https://phabricator.services.mozilla.com/D218444
This problem affected almost all the patches in the stack, but for some reason not the last two, D222299 and D226717.
Checking out the commit associated with the Phabricator patch and doing moz-phab submit -s -f
sends the correct diff to Phabricator.
Assignee | ||
Updated•9 days ago
|
Assignee | ||
Comment 1•9 days ago
|
||
I suspect this is due to this commit https://github.com/mozilla-conduit/review/commit/2a4296d749e43e5eb8da833837eeca46257e4274, which impacts both Git and Hg. Git doesn't need it anymore, but it looks like Hg does.
Assignee | ||
Comment 2•9 days ago
|
||
This step was removed from the main submit logic, as it was no longer
needed by git, and looked unecessary for hg. Not so!
When computing the diffs, the Hg logic seems to take into account the
current state of the working directory. This leads to incorrect diffs
for anything but the last commit of a stack.
Comment 3•9 days ago
|
||
You can give hg two revisions and it will compute the diff between them, with -r x::y
Assignee | ||
Comment 4•9 days ago
|
||
I have a reproduction. This only happens for commits that change the same files.
Assignee | ||
Comment 5•9 days ago
|
||
Assignee | ||
Comment 6•9 days ago
|
||
Updated•9 days ago
|
Updated•9 days ago
|
Assignee | ||
Comment 7•9 days ago
|
||
Comment 8•8 days ago
|
||
This is fixed in moz-phab
1.8.1.
Updated•8 days ago
|
Description
•