RFR: Convert path separators in patch file to unix explicitly

Erik Duveblad via github.com duke at openjdk.java.net
Mon Aug 5 10:35:23 UTC 2019

On Thu, 1 Aug 2019 19:30:30 GMT, JornVernee via github.com <duke at openjdk.java.net> wrote:

> I ran into trouble when trying to apply a patch file generated with Windows Git to a mercurial repository through cygwin. It wasn't recognizing the files since the paths in the patch file were using Windows path separators.
> The spec doesn't seem to mention path separators: https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html#Detailed-Unified
> But, both the Windows Git and Mercurial clients I have installed are handling unix path separators just fine. So, in this PR I've changed the patch file generators to use unix path separators explicitly, which solves the problem.
> ----------------
> Commits:
>  - cefd6ae1:	Convert path separators in patch file to unix explicitly
> Pull request:
> http://git.openjdk.java.net/skara/pull/35
> Webrev:
> https://openjdk.github.io/cr/skara/35/webrev.00
> Patch:
> http://git.openjdk.java.net/skara/pull/35.diff
> Fetch command:
> git fetch https://github.com/openjdk/skara.git pull/35/head:pull/35

Hi Jorn,

thanks for testing out the tools using Cygwin!

The patch itself looks good, but maybe this patch should take the opportunity to fix https://bugs.openjdk.java.net/browse/SKARA-7 as well? I would prefer moving away from `Webrev` having its own logic for creating `.patch` files, it should use `Diff::write` and `Diff::toString` instead. I suspect we have the same exact issue in `Diff::write`, so please fix the bug there as well, even if you don't refactor `Webrev` to use `Diff::write` :bowing_man:

PR: http://git.openjdk.java.net/skara/pull/35

More information about the skara-dev mailing list