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

Diff for /src/usr.bin/cvs/status.c between version 1.19 and 1.20

version 1.19, 2005/04/18 21:02:50 version 1.20, 2005/04/27 04:54:46
Line 55 
Line 55 
 };  };
   
   
 int cvs_status_file      (CVSFILE *, void *);  int cvs_status_remote    (CVSFILE *, void *);
 int cvs_status_local     (CVSFILE *, void *);  int cvs_status_local     (CVSFILE *, void *);
 int cvs_status_options   (char *, int, char **, int *);  int cvs_status_options   (char *, int, char **, int *);
 int cvs_status_sendflags (struct cvsroot *);  int cvs_status_sendflags (struct cvsroot *);
Line 63 
Line 63 
 struct cvs_cmd_info cvs_status = {  struct cvs_cmd_info cvs_status = {
         cvs_status_options,          cvs_status_options,
         cvs_status_sendflags,          cvs_status_sendflags,
         cvs_status_file,          cvs_status_remote,
         NULL, NULL,          NULL, NULL,
         CF_SORT | CF_IGNORE | CF_RECURSE,          CF_SORT | CF_IGNORE | CF_RECURSE,
         CVS_REQ_STATUS,          CVS_REQ_STATUS,
Line 106 
Line 106 
 }  }
   
 /*  /*
  * cvs_status_file()   * cvs_status_remote()
  *   *
  * Get the status of a single file.   * Get the status of a single file.
  */   */
 int  int
 cvs_status_file(CVSFILE *cfp, void *arg)  cvs_status_remote(CVSFILE *cfp, void *arg)
 {  {
         int ret;          int ret;
         char *repo, fpath[MAXPATHLEN];          char *repo, fpath[MAXPATHLEN];
Line 140 
Line 140 
   
         switch (cfp->cf_cvstat) {          switch (cfp->cf_cvstat) {
         case CVS_FST_UNKNOWN:          case CVS_FST_UNKNOWN:
                 ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE,                  ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cfp->cf_name);
                     CVS_FILE_NAME(cfp));  
                 break;                  break;
         case CVS_FST_UPTODATE:          case CVS_FST_UPTODATE:
                 ret = cvs_sendreq(root, CVS_REQ_UNCHANGED,                  ret = cvs_sendreq(root, CVS_REQ_UNCHANGED, cfp->cf_name);
                     CVS_FILE_NAME(cfp));  
                 break;                  break;
         case CVS_FST_ADDED:          case CVS_FST_ADDED:
         case CVS_FST_MODIFIED:          case CVS_FST_MODIFIED:
                 ret = cvs_sendreq(root, CVS_REQ_MODIFIED,                  ret = cvs_sendreq(root, CVS_REQ_MODIFIED, cfp->cf_name);
                     CVS_FILE_NAME(cfp));  
                 if (ret == 0)                  if (ret == 0)
                         ret = cvs_sendfile(root, fpath);                          ret = cvs_sendfile(root, fpath);
         default:          default:
Line 166 
Line 163 
         int l;          int l;
         char *repo, buf[MAXNAMLEN], fpath[MAXPATHLEN], rcspath[MAXPATHLEN];          char *repo, buf[MAXNAMLEN], fpath[MAXPATHLEN], rcspath[MAXPATHLEN];
         RCSFILE *rf;          RCSFILE *rf;
         struct cvs_ent *entp;  
         struct cvsroot *root;          struct cvsroot *root;
   
         if (cfp->cf_type == DT_DIR)          if (cfp->cf_type == DT_DIR)
Line 176 
Line 172 
         repo = CVS_DIR_REPO(cfp);          repo = CVS_DIR_REPO(cfp);
   
         cvs_file_getpath(cfp, fpath, sizeof(fpath));          cvs_file_getpath(cfp, fpath, sizeof(fpath));
         entp = cvs_ent_getent(fpath);  
   
         if (cfp->cf_cvstat == CVS_FST_UNKNOWN) {          if (cfp->cf_cvstat == CVS_FST_UNKNOWN) {
                 cvs_log(LP_WARN, "I know nothing about %s", fpath);                  cvs_log(LP_WARN, "I know nothing about %s", fpath);
Line 188 
Line 183 
         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);
         }          }
   
         rf = rcs_open(rcspath, RCS_READ);          rf = rcs_open(rcspath, RCS_READ);
         if (rf == NULL) {          if (rf == NULL) {
                 if (entp != NULL)  
                         cvs_ent_free(entp);  
                 return (-1);                  return (-1);
         }          }
   
Line 208 
Line 199 
         cvs_printf(CVS_STATUS_SEP "\nFile: %-18sStatus: %s\n\n",          cvs_printf(CVS_STATUS_SEP "\nFile: %-18sStatus: %s\n\n",
             buf, cvs_statstr[cfp->cf_cvstat]);              buf, cvs_statstr[cfp->cf_cvstat]);
   
         if (entp == NULL) {          if (cfp->cf_cvstat == CVS_FST_UNKNOWN) {
                 snprintf(buf, sizeof(buf), "No entry for %s",                  snprintf(buf, sizeof(buf), "No entry for %s",
                     CVS_FILE_NAME(cfp));                      CVS_FILE_NAME(cfp));
         } else {          } else {
                 snprintf(buf, sizeof(buf), "%s %s",                  snprintf(buf, sizeof(buf), "%s %s",
                     rcsnum_tostr(entp->ce_rev, buf, sizeof(buf)),                      rcsnum_tostr(cfp->cf_lrev, buf, sizeof(buf)),
                     "date here");                      "date here");
         }          }
   
Line 226 
Line 217 
   
         rcs_close(rf);          rcs_close(rf);
   
         if (entp != NULL)  
                 cvs_ent_free(entp);  
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20