[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.76 and 1.77

version 1.76, 2005/12/02 01:13:12 version 1.77, 2005/12/02 13:43:32
Line 435 
Line 435 
 static int  static int
 checkin_update(struct checkin_params *pb)  checkin_update(struct checkin_params *pb)
 {  {
         char  *filec;          char  *filec, numb1[64], numb2[64];
         BUF *bp;          BUF *bp;
   
         pb->frev = pb->file->rf_head;          pb->frev = pb->file->rf_head;
Line 443 
Line 443 
         /* If revision passed on command line is less than HEAD, bail. */          /* If revision passed on command line is less than HEAD, bail. */
         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, "revision is too low!");                  cvs_log(LP_ERR,
                       "%s: revision %s too low; must be higher than %s",
                       pb->file->rf_path,
                       rcsnum_tostr(pb->newrev, numb1, sizeof(numb1)),
                       rcsnum_tostr(pb->frev, numb2, sizeof(numb2)));
                 rcs_close(pb->file);                  rcs_close(pb->file);
                 return (-1);                  return (-1);
         }          }
   
           if (checkin_checklock(pb) < 0) {
                   cvs_log(LP_ERR, "%s: no lock set by %s",
                       pb->file->rf_path, pb->username);
                   return (-1);
           }
   
         /* Load file contents */          /* Load file contents */
         if ((bp = cvs_buf_load(pb->filename, BUF_AUTOEXT)) == NULL) {          if ((bp = cvs_buf_load(pb->filename, BUF_AUTOEXT)) == NULL) {
                 cvs_log(LP_ERR, "failed to load '%s'", pb->filename);                  cvs_log(LP_ERR, "failed to load '%s'", pb->filename);
Line 473 
Line 483 
                 checkin_revert(pb);                  checkin_revert(pb);
                 return (0);                  return (0);
         }          }
   
         /* Check for a lock belonging to this user. If none, abort check-in. */  
         if (checkin_checklock(pb) < 0)  
                 return (-1);  
   
         /* If no log message specified, get it interactively. */          /* If no log message specified, get it interactively. */
         if (pb->flags & INTERACTIVE)          if (pb->flags & INTERACTIVE)

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77