[BACK]Return to ci.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rcs

Diff for /src/usr.bin/rcs/ci.c between version 1.153 and 1.154

version 1.153, 2006/04/18 03:35:57 version 1.154, 2006/04/19 06:53:41
Line 69 
Line 69 
 static int       checkin_checklock(struct checkin_params *);  static int       checkin_checklock(struct checkin_params *);
 static char     *checkin_diff_file(struct checkin_params *);  static char     *checkin_diff_file(struct checkin_params *);
 static char     *checkin_getdesc(void);  static char     *checkin_getdesc(void);
 static char     *checkin_getlogmsg(RCSNUM *, RCSNUM *);  static char     *checkin_getlogmsg(RCSNUM *, RCSNUM *, int);
 static int       checkin_init(struct checkin_params *);  static int       checkin_init(struct checkin_params *);
 static int       checkin_keywordscan(char *, RCSNUM **, time_t *, char **,  static int       checkin_keywordscan(char *, RCSNUM **, time_t *, char **,
     char **);      char **);
Line 169 
Line 169 
                                 fatal("invalid symbol `%s'", pb.symbol);                                  fatal("invalid symbol `%s'", pb.symbol);
                         break;                          break;
                 case 'q':                  case 'q':
                         verbose = 0;                          pb.flags |= QUIET;
                         break;                          break;
                 case 'r':                  case 'r':
                         rcs_setrevstr(&rev_str, rcs_optarg);                          rcs_setrevstr(&rev_str, rcs_optarg);
Line 269 
Line 269 
                 if (pb.file == NULL)                  if (pb.file == NULL)
                         fatal("failed to open rcsfile '%s'", pb.fpath);                          fatal("failed to open rcsfile '%s'", pb.fpath);
   
                 if (verbose == 1)                  if (!(pb.flags & QUIET))
                         printf("%s  <--  %s\n", pb.fpath, pb.filename);                          printf("%s  <--  %s\n", pb.fpath, pb.filename);
   
                 /* XXX - Should we rcsnum_free(pb.newrev)? */                  /* XXX - Should we rcsnum_free(pb.newrev)? */
Line 300 
Line 300 
                 rcs_close(pb.file);                  rcs_close(pb.file);
         }          }
   
         if (verbose == 1 && status == 0)          if (!(pb.flags & QUIET) && status == 0)
                 printf("done\n");                  printf("done\n");
   
         return (status);          return (status);
Line 377 
Line 377 
  * Returns pointer to a char array on success, NULL on failure.   * Returns pointer to a char array on success, NULL on failure.
  */   */
 static char *  static char *
 checkin_getlogmsg(RCSNUM *rev, RCSNUM *rev2)  checkin_getlogmsg(RCSNUM *rev, RCSNUM *rev2, int flags)
 {  {
         char   *rcs_msg, nrev[16], prev[16];          char   *rcs_msg, nrev[16], prev[16];
         const char *prompt =          const char *prompt =
Line 394 
Line 394 
                 rcsnum_tostr(rev2, nrev, sizeof(nrev));                  rcsnum_tostr(rev2, nrev, sizeof(nrev));
         rcsnum_free(tmprev);          rcsnum_free(tmprev);
   
         if (verbose == 1)          if (!(flags & QUIET))
                 printf("new revision: %s; previous revision: %s\n", nrev,                  printf("new revision: %s; previous revision: %s\n", nrev,
                     prev);                      prev);
   
Line 519 
Line 519 
   
         /* 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);                  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)
Line 667 
Line 668 
          * emulate odd GNU behaviour and fetch log message.           * emulate odd GNU behaviour and fetch log message.
          */           */
         if (fetchlog == 1) {          if (fetchlog == 1) {
                 pb->rcs_msg = checkin_getlogmsg(pb->frev, pb->newrev);                  pb->rcs_msg = checkin_getlogmsg(pb->frev, pb->newrev,
                       pb->flags);
                 rcsnum_free(pb->frev);                  rcsnum_free(pb->frev);
         }          }
   
Line 734 
Line 736 
         }          }
   
   
         if (verbose == 1) {          if (!(pb->flags & QUIET)) {
                 fprintf(stderr, "initial revision: %s\n",                  fprintf(stderr, "initial revision: %s\n",
                     rcsnum_tostr(pb->newrev, numb, sizeof(numb)));                      rcsnum_tostr(pb->newrev, numb, sizeof(numb)));
         }          }
Line 757 
Line 759 
 {  {
         char rbuf[16];          char rbuf[16];
         int ret;          int ret;
         if (verbose == 1)          if (!(pb->flags & QUIET))
                 printf("symbol: %s\n", pb->symbol);                  printf("symbol: %s\n", pb->symbol);
         if (pb->flags & CI_SYMFORCE) {          if (pb->flags & CI_SYMFORCE) {
                 if (rcs_sym_remove(pb->file, pb->symbol) < 0) {                  if (rcs_sym_remove(pb->file, pb->symbol) < 0) {

Legend:
Removed from v.1.153  
changed lines
  Added in v.1.154