mercurial/diffhelpers.c
changeset 5483 ec2cc1dadbf7
parent 4897 4574925db5c0
child 10129 900ccbd79ef7
equal deleted inserted replaced
5482:e5eedd74e70f 5483:ec2cc1dadbf7
    81 			c = *s;
    81 			c = *s;
    82 			if (strcmp(s, "\\ No newline at end of file\n") == 0) {
    82 			if (strcmp(s, "\\ No newline at end of file\n") == 0) {
    83 				_fix_newline(hunk, a, b);
    83 				_fix_newline(hunk, a, b);
    84 				continue;
    84 				continue;
    85 			}
    85 			}
       
    86 			if (c == '\n') {
       
    87 				/* Some patches may be missing the control char
       
    88 				 * on empty lines. Supply a leading space. */
       
    89 				Py_DECREF(x);
       
    90 				x = PyString_FromString(" \n");
       
    91 			}
    86 			PyList_Append(hunk, x);
    92 			PyList_Append(hunk, x);
    87 			if (c == '+') {
    93 			if (c == '+') {
    88 				l = PyString_FromString(s + 1);
    94 				l = PyString_FromString(s + 1);
    89 				PyList_Append(b, l);
    95 				PyList_Append(b, l);
    90 				Py_DECREF(l);
    96 				Py_DECREF(l);