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

Diff for /src/usr.bin/cvs/file.c between version 1.191 and 1.192

version 1.191, 2007/06/04 21:54:26 version 1.192, 2007/06/26 02:24:10
Line 338 
Line 338 
         struct cvs_ent_line *line;          struct cvs_ent_line *line;
         struct cvs_flisthead fl, dl;          struct cvs_flisthead fl, dl;
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         char *buf, *ebuf, *cp, repo[MAXPATHLEN], fpath[MAXPATHLEN];          char *p, *buf, *ebuf, *cp, repo[MAXPATHLEN], fpath[MAXPATHLEN];
   
         cvs_log(LP_TRACE, "cvs_file_walkdir(%s)", cf->file_path);          cvs_log(LP_TRACE, "cvs_file_walkdir(%s)", cf->file_path);
   
Line 359 
Line 359 
             CVS_PATH_CVSDIR);              CVS_PATH_CVSDIR);
   
         l = stat(fpath, &st);          l = stat(fpath, &st);
         if (cvs_cmdop != CVS_OP_IMPORT &&          if (cvs_cmdop != CVS_OP_IMPORT && cvs_cmdop != CVS_OP_RLOG &&
             (l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) {              (l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) {
                 return;                  return;
         }          }
Line 414 
Line 414 
                                 continue;                                  continue;
                         }                          }
   
                         (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s",                          len = xsnprintf(fpath, MAXPATHLEN, "%s/%s",
                             cf->file_path, dp->d_name);                              cf->file_path, dp->d_name);
   
                         /*                          /*
Line 461 
Line 461 
                                 continue;                                  continue;
                         }                          }
   
                         if (!(cr->flags & CR_RECURSE_DIRS) &&  
                             type == CVS_DIR) {  
                                 cp += dp->d_reclen;  
                                 continue;  
                         }  
   
                         switch (type) {                          switch (type) {
                         case CVS_DIR:                          case CVS_DIR:
                                 cvs_file_get(fpath, &dl);                                  if (cr->flags & CR_RECURSE_DIRS)
                                           cvs_file_get(fpath, &dl);
                                 break;                                  break;
                         case CVS_FILE:                          case CVS_FILE:
                                   if ((p = strrchr(cf->file_path, '/')) &&
                                       !strcmp(p + 1, CVS_PATH_ATTIC)) {
   
                                           *p = '\0';
                                           len = xsnprintf(fpath, MAXPATHLEN,
                                               "%s/%s", cf->file_path, dp->d_name);
                                           *p = '/';
                                   }
                                   if (fpath[len - 2] == ',' &&
                                       fpath[len - 1] == 'v')
                                           fpath[len - 2] = '\0';
                                 cvs_file_get(fpath, &fl);                                  cvs_file_get(fpath, &fl);
                                 break;                                  break;
                         default:                          default:
Line 611 
Line 617 
         if (cf->file_type == CVS_DIR) {          if (cf->file_type == CVS_DIR) {
                 if (cf->fd == -1 && stat(rcsfile, &st) != -1)                  if (cf->fd == -1 && stat(rcsfile, &st) != -1)
                         cf->file_status = DIR_CREATE;                          cf->file_status = DIR_CREATE;
                 else if (cf->file_ent != NULL)                  else if (cf->file_ent != NULL || cvs_cmdop == CVS_OP_RLOG)
                         cf->file_status = FILE_UPTODATE;                          cf->file_status = FILE_UPTODATE;
                 else                  else
                         cf->file_status = FILE_UNKNOWN;                          cf->file_status = FILE_UNKNOWN;
Line 627 
Line 633 
                 break;                  break;
         case CVS_OP_IMPORT:          case CVS_OP_IMPORT:
         case CVS_OP_LOG:          case CVS_OP_LOG:
           case CVS_OP_RLOG:
                 rflags |= RCS_PARSE_FULLY;                  rflags |= RCS_PARSE_FULLY;
                 break;                  break;
         }          }

Legend:
Removed from v.1.191  
changed lines
  Added in v.1.192