[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.146 and 1.147

version 1.146, 2006/04/14 00:22:46 version 1.147, 2006/04/14 01:11:07
Line 298 
Line 298 
                 rcs_close(pb.file);                  rcs_close(pb.file);
         }          }
   
         if ((verbose == 1) && (status == 0))          if (verbose == 1 && status == 0)
                 printf("done\n");                  printf("done\n");
   
         return (status);          return (status);
Line 484 
Line 484 
         filec = (char *)cvs_buf_release(bp);          filec = (char *)cvs_buf_release(bp);
   
         /* If this is a zero-ending RCSNUM eg 4.0, increment it (eg to 4.1) */          /* If this is a zero-ending RCSNUM eg 4.0, increment it (eg to 4.1) */
         if ((pb->newrev != NULL) && (RCSNUM_ZERO_ENDING(pb->newrev)))          if (pb->newrev != NULL && RCSNUM_ZERO_ENDING(pb->newrev))
                 pb->newrev = rcsnum_inc(pb->newrev);                  pb->newrev = rcsnum_inc(pb->newrev);
   
         if (checkin_checklock(pb) < 0)          if (checkin_checklock(pb) < 0)
Line 494 
Line 494 
          * XXX only applies to ci -r1.2 foo for example if HEAD is > 1.2 and           * XXX only applies to ci -r1.2 foo for example if HEAD is > 1.2 and
          * there is no lock set for the user.           * there is no lock set for the user.
          */           */
         if ((pb->newrev != NULL)          if (pb->newrev != NULL &&
             && (rcsnum_cmp(pb->newrev, pb->frev, 0) > 0)) {              rcsnum_cmp(pb->newrev, pb->frev, 0) > 0) {
                 cvs_log(LP_ERR,                  cvs_log(LP_ERR,
                     "%s: revision %s too low; must be higher than %s",                      "%s: revision %s too low; must be higher than %s",
                     pb->file->rf_path,                      pb->file->rf_path,
Line 508 
Line 508 
          * Set the date of the revision to be the last modification           * Set the date of the revision to be the last modification
          * time of the working file if -d has no argument.           * time of the working file if -d has no argument.
          */           */
         if (pb->date == DATE_MTIME          if (pb->date == DATE_MTIME &&
             && (checkin_mtimedate(pb) < 0))              (checkin_mtimedate(pb) < 0))
                 goto fail;                  goto fail;
   
         /* Date from argv/mtime must be more recent than HEAD */          /* Date from argv/mtime must be more recent than HEAD */
Line 586 
Line 586 
                 fatal("failed to set new head revision");                  fatal("failed to set new head revision");
   
         /* Attach a symbolic name to this revision if specified. */          /* Attach a symbolic name to this revision if specified. */
         if (pb->symbol != NULL          if (pb->symbol != NULL &&
             && (checkin_attach_symbol(pb) < 0))              (checkin_attach_symbol(pb) < 0))
                 goto fail;                  goto fail;
   
         /* Set the state of this revision if specified. */          /* Set the state of this revision if specified. */
Line 610 
Line 610 
         rcs_write(pb->file);          rcs_write(pb->file);
   
         /* Do checkout if -u or -l are specified. */          /* Do checkout if -u or -l are specified. */
         if (((pb->flags & CO_LOCK) || (pb->flags & CO_UNLOCK))          if (((pb->flags & CO_LOCK) || (pb->flags & CO_UNLOCK)) &&
             && !(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);
   
Line 644 
Line 644 
         struct stat st;          struct stat st;
   
         /* If this is a zero-ending RCSNUM eg 4.0, increment it (eg to 4.1) */          /* If this is a zero-ending RCSNUM eg 4.0, increment it (eg to 4.1) */
         if ((pb->newrev != NULL) && (RCSNUM_ZERO_ENDING(pb->newrev))) {          if (pb->newrev != NULL && RCSNUM_ZERO_ENDING(pb->newrev)) {
                 pb->frev = rcsnum_alloc();                  pb->frev = rcsnum_alloc();
                 rcsnum_cpy(pb->newrev, pb->frev, 0);                  rcsnum_cpy(pb->newrev, pb->frev, 0);
                 pb->newrev = rcsnum_inc(pb->newrev);                  pb->newrev = rcsnum_inc(pb->newrev);
Line 704 
Line 704 
          * Set the date of the revision to be the last modification           * Set the date of the revision to be the last modification
          * time of the working file if -d has no argument.           * time of the working file if -d has no argument.
          */           */
         if (pb->date == DATE_MTIME          if (pb->date == DATE_MTIME &&
             && (checkin_mtimedate(pb) < 0))              (checkin_mtimedate(pb) < 0))
                 goto fail;                  goto fail;
   
         /* Now add our new revision */          /* Now add our new revision */
Line 734 
Line 734 
         }          }
   
         /* Attach a symbolic name to this revision if specified. */          /* Attach a symbolic name to this revision if specified. */
         if (pb->symbol != NULL          if (pb->symbol != NULL &&
             && (checkin_attach_symbol(pb) < 0))              (checkin_attach_symbol(pb) < 0))
                 goto fail;                  goto fail;
   
         /* Set the state of this revision if specified. */          /* Set the state of this revision if specified. */
Line 756 
Line 756 
         rcs_write(pb->file);          rcs_write(pb->file);
   
         /* Do checkout if -u or -l are specified. */          /* Do checkout if -u or -l are specified. */
         if (((pb->flags & CO_LOCK) || (pb->flags & CO_UNLOCK))          if (((pb->flags & CO_LOCK) || (pb->flags & CO_UNLOCK)) &&
             && !(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);
         }          }
Line 796 
Line 796 
                         }                          }
                 }                  }
         }          }
         if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev) == -1)          if ((ret = rcs_sym_add(pb->file, pb->symbol, pb->newrev) == -1) &&
             && (rcs_errno == RCS_ERR_DUPENT)) {              (rcs_errno == RCS_ERR_DUPENT)) {
                 rcsnum_tostr(rcs_sym_getrev(pb->file, pb->symbol),                  rcsnum_tostr(rcs_sym_getrev(pb->file, pb->symbol),
                     rbuf, sizeof(rbuf));                      rbuf, sizeof(rbuf));
                 cvs_log(LP_ERR,                  cvs_log(LP_ERR,
Line 851 
Line 851 
         struct rcs_lock *lkp;          struct rcs_lock *lkp;
   
         TAILQ_FOREACH(lkp, &(pb->file->rf_locks), rl_list) {          TAILQ_FOREACH(lkp, &(pb->file->rf_locks), rl_list) {
                 if ((!strcmp(lkp->rl_name, pb->username)) &&                  if (!strcmp(lkp->rl_name, pb->username) &&
                     (!rcsnum_cmp(lkp->rl_num, pb->frev, 0)))                      !rcsnum_cmp(lkp->rl_num, pb->frev, 0))
                         return (0);                          return (0);
         }          }
   

Legend:
Removed from v.1.146  
changed lines
  Added in v.1.147