version 1.31, 2005/10/15 23:44:58 |
version 1.32, 2005/10/16 01:55:36 |
|
|
"failed to set new rd_text for head rev"); |
"failed to set new rd_text for head rev"); |
exit (1); |
exit (1); |
} |
} |
|
|
/* |
/* |
* Set the date of the revision to be the last modification time |
* Set the date of the revision to be the last modification time |
* of the working file if -d is specified without an argument. |
* of the working file if -d is specified without an argument. |
|
|
} |
} |
date = (time_t)sb.st_mtimespec.tv_sec; |
date = (time_t)sb.st_mtimespec.tv_sec; |
} |
} |
|
|
/* |
/* |
* Now add our new revision |
* Now add our new revision |
*/ |
*/ |
|
|
rcs_head_set(file, newrev); |
rcs_head_set(file, newrev); |
else |
else |
newrev = file->rf_head; |
newrev = file->rf_head; |
|
|
/* |
/* |
* New head revision has to contain entire file; |
* New head revision has to contain entire file; |
*/ |
*/ |
|
|
cvs_log(LP_ERR, "failed to allocate log buffer"); |
cvs_log(LP_ERR, "failed to allocate log buffer"); |
return (NULL); |
return (NULL); |
} |
} |
|
|
cvs_printf("new revision: %s; previous revision: %s\n", nrev, prev); |
cvs_printf("new revision: %s; previous revision: %s\n", nrev, prev); |
cvs_printf("enter log message, terminated with single " |
cvs_printf("enter log message, terminated with single " |
"'.' or end of file:\n"); |
"'.' or end of file:\n"); |
cvs_printf(">> "); |
cvs_printf(">> "); |
|
|
for (;;) { |
for (;;) { |
fgets(buf, (int)sizeof(buf), stdin); |
fgets(buf, (int)sizeof(buf), stdin); |
if (feof(stdin) || ferror(stdin) || buf[0] == '.') |
if (feof(stdin) || ferror(stdin) || buf[0] == '.') |
|
|
cvs_buf_append(logbuf, buf, strlen(buf)); |
cvs_buf_append(logbuf, buf, strlen(buf)); |
cvs_printf(">> "); |
cvs_printf(">> "); |
} |
} |
|
|
cvs_buf_putc(logbuf, '\0'); |
cvs_buf_putc(logbuf, '\0'); |
rcs_msg = (char *)cvs_buf_release(logbuf); |
rcs_msg = (char *)cvs_buf_release(logbuf); |
|
|
return (rcs_msg); |
return (rcs_msg); |
} |
} |