Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/xcvs/dist/src Handle the last newline in the "...



details:   https://anonhg.NetBSD.org/src/rev/aa022866f37e
branches:  trunk
changeset: 343693:aa022866f37e
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 21 00:56:44 2016 +0000

description:
Handle the last newline in the "special" import for new file like RCS does.
I.e. make_message_rcsvalid() removes it, and we put it back.

diffstat:

 external/gpl2/xcvs/dist/src/import.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r f3ba1c549b40 -r aa022866f37e external/gpl2/xcvs/dist/src/import.c
--- a/external/gpl2/xcvs/dist/src/import.c      Sat Feb 20 23:09:03 2016 +0000
+++ b/external/gpl2/xcvs/dist/src/import.c      Sun Feb 21 00:56:44 2016 +0000
@@ -1407,7 +1407,7 @@
            /* We are going to put the log message in the revision on the
               branch.  So putting it here too seems kind of redundant, I
               guess (and that is what CVS has always done, anyway).  */
-           if (fprintf (fprcs, "Initial revision\012") < 0)
+           if (fprintf (fprcs, "Initial revision") < 0)
                goto write_error;
        }
        else
@@ -1415,7 +1415,7 @@
            if (expand_at_signs (message, (off_t) strlen (message), fprcs) < 0)
                goto write_error;
        }
-       if (fprintf (fprcs, "@\012") < 0 ||
+       if (fprintf (fprcs, "\012@\012") < 0 ||
            fprintf (fprcs, "text\012@") < 0)
        {
            goto write_error;
@@ -1441,7 +1441,7 @@
                fprintf (fprcs, "log\012@") < 0 ||
                expand_at_signs (message,
                                 (off_t) strlen (message), fprcs) < 0 ||
-               fprintf (fprcs, "@\012text\012") < 0 ||
+               fprintf (fprcs, "\012@\012text\012") < 0 ||
                fprintf (fprcs, "@@\012") < 0)
                goto write_error;
        }



Home | Main Index | Thread Index | Old Index