[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.210 and 1.211

version 1.210, 2008/01/21 16:36:46 version 1.211, 2008/01/31 10:15:05
Line 370 
Line 370 
                 return;                  return;
   
         /*          /*
            * If this is a repository-only command, do not touch any
            * locally available directories or try to create them.
            */
           if (!(cmdp->cmd_flags & CVS_USE_WDIR)) {
                   TAILQ_INIT(&fl);
                   TAILQ_INIT(&dl);
                   goto walkrepo;
           }
   
           /*
          * If we do not have a admin directory inside here, dont bother,           * If we do not have a admin directory inside here, dont bother,
          * unless we are running export, import, rlog or rtag.           * unless we are running export or import.
          */           */
         (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", cf->file_path,          (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", cf->file_path,
             CVS_PATH_CVSDIR);              CVS_PATH_CVSDIR);
   
         l = stat(fpath, &st);          l = stat(fpath, &st);
         if (cvs_cmdop != CVS_OP_EXPORT && cvs_cmdop != CVS_OP_IMPORT &&          if (cvs_cmdop != CVS_OP_EXPORT && cvs_cmdop != CVS_OP_IMPORT &&
             cvs_cmdop != CVS_OP_RLOG && cvs_cmdop != CVS_OP_RTAG &&  
             (l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) {              (l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) {
                 return;                  return;
         }          }
Line 530 
Line 539 
   
         cvs_ent_close(entlist, ENT_NOSYNC);          cvs_ent_close(entlist, ENT_NOSYNC);
   
   walkrepo:
         if (cr->flags & CR_REPO) {          if (cr->flags & CR_REPO) {
                 cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN);                  cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN);
                 cvs_repository_lock(repo);                  cvs_repository_lock(repo);
Line 550 
Line 560 
         if (cr->leavedir != NULL)          if (cr->leavedir != NULL)
                 cr->leavedir(cf);                  cr->leavedir(cf);
   
         if (cvs_directory_tag != NULL) {          if (cvs_directory_tag != NULL && cmdp->cmd_flags & CVS_USE_WDIR) {
                 cvs_write_tagfile(cf->file_path, cvs_directory_tag, NULL, 0);                  cvs_write_tagfile(cf->file_path, cvs_directory_tag, NULL, 0);
                 xfree(cvs_directory_tag);                  xfree(cvs_directory_tag);
                 cvs_directory_tag = NULL;                  cvs_directory_tag = NULL;
Line 594 
Line 604 
         (void)xsnprintf(rcsfile, MAXPATHLEN, "%s/%s",          (void)xsnprintf(rcsfile, MAXPATHLEN, "%s/%s",
             repo, cf->file_name);              repo, cf->file_name);
   
         if (cvs_cmdop != CVS_OP_RLOG && cvs_cmdop != CVS_OP_RTAG &&          if (cf->file_type == CVS_FILE) {
             cf->file_type == CVS_FILE) {  
                 len = strlcat(rcsfile, RCS_FILE_EXT, MAXPATHLEN);                  len = strlcat(rcsfile, RCS_FILE_EXT, MAXPATHLEN);
                 if (len >= MAXPATHLEN)                  if (len >= MAXPATHLEN)
                         fatal("cvs_file_classify: truncation");                          fatal("cvs_file_classify: truncation");
         }          }
   
         cf->file_rpath = xstrdup(rcsfile);          cf->file_rpath = xstrdup(rcsfile);
         entlist = cvs_ent_open(cf->file_wd);  
         cf->file_ent = cvs_ent_get(entlist, cf->file_name);  
         cvs_ent_close(entlist, ENT_NOSYNC);  
   
           if (cmdp->cmd_flags & CVS_USE_WDIR) {
                   entlist = cvs_ent_open(cf->file_wd);
                   cf->file_ent = cvs_ent_get(entlist, cf->file_name);
                   cvs_ent_close(entlist, ENT_NOSYNC);
           } else
                   cf->file_ent = NULL;
   
         if (cf->file_ent != NULL) {          if (cf->file_ent != NULL) {
                 if (cf->file_ent->ce_type == CVS_ENT_DIR &&                  if (cf->file_ent->ce_type == CVS_ENT_DIR &&
                     cf->file_type != CVS_DIR)                      cf->file_type != CVS_DIR)
Line 621 
Line 634 
         }          }
   
         if (cf->file_type == CVS_DIR) {          if (cf->file_type == CVS_DIR) {
                 if (cf->fd == -1 && stat(rcsfile, &st) != -1)                  if (!(cmdp->cmd_flags & CVS_USE_WDIR))
                           cf->file_status = FILE_UPTODATE;
                   else if (cf->fd == -1 && stat(rcsfile, &st) != -1)
                         cf->file_status = DIR_CREATE;                          cf->file_status = DIR_CREATE;
                 else if (cf->file_ent != NULL || cvs_cmdop == CVS_OP_RLOG ||                  else if (cf->file_ent != NULL || cvs_cmdop == CVS_OP_RLOG ||
                     cvs_cmdop == CVS_OP_RTAG)                      cvs_cmdop == CVS_OP_RTAG)

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.211