Hi,

GNU patch supports comments in patches, and Emacs mode supports these as
well.

Would it be possible to support them in hg import?

They seem pretty useful to make review easier.


Example:

# HG changeset patch
# User Arne Babenhauserheide <arne_...@web.de>
# Date 1719561559 -7200
#      Fri Jun 28 09:59:19 2024 +0200
# Node ID 394920c6a1095ee357429464f509c78098f232f8
# Parent  0000000000000000000000000000000000000000
init

diff --git a/1 b/1
new file mode 100644
--- /dev/null
+++ b/1
@@ -0,0 +1,5 @@
+Hello
+
# this is a comment
+World
+
+Or so.


I exported this with hg export 0 > 1.patch and added

    # this is a comment


When using

    patch -p1 < 1.patch

this gets cleanly applied — without the comment.

But hg import complains:

    $ hg import 1.patch
    applying 1.patch
    abort: bad hunk #1 @@ -0,0 +1,5 @@
     (1 0 5 5)
    (check that whitespace in the patch has not been mangled)


Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mercurial mailing list
Mercurial@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to