hg-printed paths don't work nicely in MozillaBuild
Categories
(Firefox Build System :: General, defect, P5)
Tracking
(Not tracked)
People
(Reporter: calixte, Unassigned)
Details
I'm using the moz-shell from C:\mozilla-build\start-shell.bat.
When I rebase a patch in using hg rebase ... I can have some conflicts and and then I get a message like
# Unresolved merge conflicts:
#
# browser\components\companion\services\workshop\build\workshop-worker-built.js
#
# To mark files as resolved: hg resolve --mark FILE
so if I copy/paste the path to resolve it, i.e. hg resolve --mark browser\components\companion\services\workshop\build\workshop-worker-built.js, it doesn't work because of the \ in the path. It's fine if I replace them with some /.
| Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Try adding single quotes around the path.
Comment 2•3 years ago
•
|
||
This is caused by hg being run in native-Windows-land, where paths use backslashes (\) and drive letters (c:) if the path isn't relative.
However, MozillaBuild itself is Linux-y (because it's based on Cygwin), so forward slashes (/) are generally used and full paths start like /c/.
Finally, Linux-y environments (more specifically, bash) interpret backslashes as "escape characters", and evaluates and removes them.
There's a couple workarounds here:
- Putting single-quotes around the relative path should ensure that the backslashes are maintained
- MozillaBuild 4.0 adds the
cygpathtool, which can be used to convert between Linux-y paths and Windows-native paths - We already specify
ui.slash=Truein MozillaBuild, so I'm a little bit surprised that these paths aren't using forward slashes already. I'm guessing that this is an issue similar to this one, where some contexts weren't respecting slash config.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•