`moz-phab patch` fails for patch containing a rename
Categories
(Conduit :: moz-phab, defect)
Tracking
(Not tracked)
People
(Reporter: botond, Unassigned)
Details
Attachments
(1 file)
5.57 KB,
text/plain
|
Details |
STR
- Check out recent m-c, such as revision 3a9fcbf00f37.
- Run
moz-phab patch --apply-to here D93895
. Note that D93895 includes two file renames, and the original files are present in 3a9fcbf00f37.
Expected results
The patch is applied, including the files being renamed.
Actual results
I get an error related to one of the renames:
$ moz-phab patch --apply-to here D93895
Patching revision: D93895
Bookmark set to phab-D93895_1
abort: gfx/layers/apz/test/mochitest/helper_scrollframe_activation_on_load.html (renamed from gfx/layers/apz/test/mochitest/helper_bug1151663.html): No such file or directory
CommandError: command 'hg' failed to complete successfully
Run moz-phab again with '--trace' to show debugging output
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
I attached the output of the same command with --trace
.
Reporter | ||
Updated•4 years ago
|
I've been unable to reproduce this issue:
$ hg st
$ hg id
3a9fcbf00f37
$ moz-phab patch --apply-to here D93895
Patching revision: D93895
Bookmark set to phab-D93895
D93895 applied
The command that moz-phab runs is essentially hg import https://d3kxowhw4s8amj.cloudfront.net/file/data/vlh3abde5dzontwetpu2/PHID-FILE-jrrshrike6w5atlvsnpi/D93895.diff
.
Thanks for attaching the debug log - I see from that you're running an old version of Mercurial (5.1); are you able to update to the latest version (5.5.2) and try again? While I don't see anything in the changelog that might have addressed this, it's a simple first place to start.
Reporter | ||
Comment 2•4 years ago
|
||
(In reply to :glob 🎈 from comment #1)
The command that moz-phab runs is essentially
hg import https://d3kxowhw4s8amj.cloudfront.net/file/data/vlh3abde5dzontwetpu2/PHID-FILE-jrrshrike6w5atlvsnpi/D93895.diff
.
I can confirm that running this command in isolation produces the same error, so I guess this is an issue on the mercurial side rather than in moz-phab.
Thanks for attaching the debug log - I see from that you're running an old version of Mercurial (5.1); are you able to update to the latest version (5.5.2) and try again? While I don't see anything in the changelog that might have addressed this, it's a simple first place to start.
After upgrading mercurial, the behaviour for me is the same.
Reporter | ||
Comment 3•4 years ago
|
||
Prefixing the command with HGRCPATH=
makes it succeed, suggesting that it's something in my .hgrc
that's messing things up.
Reporter | ||
Comment 4•4 years ago
•
|
||
It seems to be this option:
[ui]
patch = patch --merge
which IIRC is something I've added to get hg import
to produce conflict markers rather than .rej
files in case of a merge conflict.
Perhaps that's expected, or perhaps I should file a mercurial bug about this. Anyways, it doesn't seem to be a moz-phab issue so I'll close this bug.
Description
•