version 1.188, 2006/09/27 06:26:35 |
version 1.189, 2006/11/09 21:47:52 |
|
|
} |
} |
|
|
/* If no log message specified, get it interactively. */ |
/* If no log message specified, get it interactively. */ |
if (pb->flags & INTERACTIVE) |
if (pb->flags & INTERACTIVE) { |
pb->rcs_msg = checkin_getlogmsg(pb->frev, pb->newrev, |
if (pb->rcs_msg != NULL) { |
pb->flags); |
fprintf(stderr, |
|
"reuse log message of previous file? [yn](y): "); |
|
if (rcs_yesno('y') != 'y') { |
|
xfree(pb->rcs_msg); |
|
pb->rcs_msg = NULL; |
|
} |
|
} |
|
if (pb->rcs_msg == NULL) |
|
pb->rcs_msg = checkin_getlogmsg(pb->frev, pb->newrev, |
|
pb->flags); |
|
} |
|
|
if (rcs_lock_remove(pb->file, pb->username, pb->frev) < 0) { |
if (rcs_lock_remove(pb->file, pb->username, pb->frev) < 0) { |
if (rcs_errno != RCS_ERR_NOENT) |
if (rcs_errno != RCS_ERR_NOENT) |
|
|
err(1, "%s", pb->filename); |
err(1, "%s", pb->filename); |
|
|
/* Strip all the write bits */ |
/* Strip all the write bits */ |
pb->file->rf_mode = st.st_mode & |
pb->file->rf_mode = st.st_mode & ~(S_IWUSR|S_IWGRP|S_IWOTH); |
(S_IXUSR|S_IXGRP|S_IXOTH|S_IRUSR|S_IRGRP|S_IROTH); |
|
|
|
(void)close(workfile_fd); |
(void)close(workfile_fd); |
(void)unlink(pb->filename); |
(void)unlink(pb->filename); |
|
|
!(pb->flags & CI_DEFAULT)) |
!(pb->flags & CI_DEFAULT)) |
checkout_rev(pb->file, pb->newrev, pb->filename, pb->flags, |
checkout_rev(pb->file, pb->newrev, pb->filename, pb->flags, |
pb->username, pb->author, NULL, NULL); |
pb->username, pb->author, NULL, NULL); |
|
|
if (pb->flags & INTERACTIVE) { |
|
xfree(pb->rcs_msg); |
|
pb->rcs_msg = NULL; |
|
} |
|
|
|
out: |
out: |
return (0); |
return (0); |
|
|
|
|
err(1, "%s", pb->filename); |
err(1, "%s", pb->filename); |
|
|
/* Strip all the write bits */ |
/* Strip all the write bits */ |
pb->file->rf_mode = st.st_mode & |
pb->file->rf_mode = st.st_mode & ~(S_IWUSR|S_IWGRP|S_IWOTH); |
(S_IXUSR|S_IXGRP|S_IXOTH|S_IRUSR|S_IRGRP|S_IROTH); |
|
|
|
(void)close(workfile_fd); |
(void)close(workfile_fd); |
(void)unlink(pb->filename); |
(void)unlink(pb->filename); |