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

Diff for /src/usr.bin/cvs/commit.c between version 1.25 and 1.26

version 1.25, 2005/04/16 18:01:26 version 1.26, 2005/04/18 21:02:49
Line 109 
Line 109 
         struct cvs_flist cl;          struct cvs_flist cl;
         CVSFILE *cfp;          CVSFILE *cfp;
   
         TAILQ_INIT(&cl);          SIMPLEQ_INIT(&cl);
         cvs_file_examine(cvs_files, cvs_commit_prepare, &cl);          cvs_file_examine(cvs_files, cvs_commit_prepare, &cl);
         if (TAILQ_EMPTY(&cl))          if (SIMPLEQ_EMPTY(&cl))
                 return (0);                  return (0);
   
         if (cvs_msg == NULL)          if (cvs_msg == NULL)
                 cvs_msg = cvs_logmsg_get(CVS_FILE_NAME(cvs_files),                  cvs_msg = cvs_logmsg_get(CVS_FILE_NAME(cvs_files),
                     NULL, &cl, NULL);                      NULL, &cl, NULL);
   
         while (!TAILQ_EMPTY(&cl)) {          while (!SIMPLEQ_EMPTY(&cl)) {
                 cfp = TAILQ_FIRST(&cl);                  cfp = SIMPLEQ_FIRST(&cl);
                 TAILQ_REMOVE(&cl, cfp, cf_list);                  SIMPLEQ_REMOVE_HEAD(&cl, cf_list);
                 cvs_file_free(cfp);                  cvs_file_free(cfp);
         }          }
   
Line 147 
Line 147 
                 if (copy == NULL)                  if (copy == NULL)
                         return (CVS_EX_DATA);                          return (CVS_EX_DATA);
   
                 TAILQ_INSERT_TAIL(clp, copy, cf_list);                  SIMPLEQ_INSERT_TAIL(clp, copy, cf_list);
         }          }
   
         return (0);          return (0);
Line 166 
Line 166 
         char *repo, rcspath[MAXPATHLEN], fpath[MAXPATHLEN];          char *repo, rcspath[MAXPATHLEN], fpath[MAXPATHLEN];
         RCSFILE *rf;          RCSFILE *rf;
         struct cvsroot *root;          struct cvsroot *root;
         struct cvs_ent *entp;  
   
         ret = 0;          ret = 0;
         rf = NULL;          rf = NULL;
Line 185 
Line 184 
         cvs_file_getpath(cf, fpath, sizeof(fpath));          cvs_file_getpath(cf, fpath, sizeof(fpath));
   
         if (cf->cf_parent != NULL)          if (cf->cf_parent != NULL)
                 repo = cf->cf_parent->cf_ddat->cd_repo;                  repo = cf->cf_parent->cf_repo;
   
         entp = cvs_ent_getent(fpath);  
         if (entp == NULL)  
                 return (CVS_EX_DATA);  
   
         if ((cf->cf_cvstat == CVS_FST_ADDED) ||          if ((cf->cf_cvstat == CVS_FST_ADDED) ||
             (cf->cf_cvstat == CVS_FST_MODIFIED)) {              (cf->cf_cvstat == CVS_FST_MODIFIED)) {
                 if (root->cr_method != CVS_METHOD_LOCAL) {                  if (root->cr_method != CVS_METHOD_LOCAL) {
                         if (cvs_sendentry(root, entp) < 0) {                          if (cvs_sendentry(root, cf) < 0) {
                                 cvs_ent_free(entp);  
                                 return (CVS_EX_PROTO);                                  return (CVS_EX_PROTO);
                         }                          }
   
                         if (cvs_sendreq(root, CVS_REQ_MODIFIED,                          if (cvs_sendreq(root, CVS_REQ_MODIFIED,
                             CVS_FILE_NAME(cf)) < 0) {                              CVS_FILE_NAME(cf)) < 0) {
                                 cvs_ent_free(entp);  
                                 return (CVS_EX_PROTO);                                  return (CVS_EX_PROTO);
                         }                          }
   
                         if (cvs_sendfile(root, fpath) < 0) {                          if (cvs_sendfile(root, fpath) < 0) {
                                 cvs_ent_free(entp);  
                                 return (CVS_EX_PROTO);                                  return (CVS_EX_PROTO);
                         }                          }
                 }                  }
Line 217 
Line 209 
         if (l == -1 || l >= (int)sizeof(rcspath)) {          if (l == -1 || l >= (int)sizeof(rcspath)) {
                 errno = ENAMETOOLONG;                  errno = ENAMETOOLONG;
                 cvs_log(LP_ERRNO, "%s", rcspath);                  cvs_log(LP_ERRNO, "%s", rcspath);
   
                 cvs_ent_free(entp);  
                 return (-1);                  return (-1);
         }          }
   
         cvs_ent_free(entp);  
   
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26