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

Diff for /src/usr.bin/cvs/update.c between version 1.103 and 1.104

version 1.103, 2007/06/28 21:38:09 version 1.104, 2007/07/03 13:22:43
Line 30 
Line 30 
 int     print = 0;  int     print = 0;
 int     build_dirs = 0;  int     build_dirs = 0;
 int     reset_stickies = 0;  int     reset_stickies = 0;
 char *tag = NULL;  char *cvs_specified_tag = NULL;
   
 static void update_clear_conflict(struct cvs_file *);  static void update_clear_conflict(struct cvs_file *);
   
Line 62 
Line 62 
                         break;                          break;
                 case 'C':                  case 'C':
                 case 'D':                  case 'D':
                         tag = optarg;                          cvs_specified_tag = optarg;
                         break;                          break;
                 case 'd':                  case 'd':
                         build_dirs = 1;                          build_dirs = 1;
Line 91 
Line 91 
                 case 'R':                  case 'R':
                         break;                          break;
                 case 'r':                  case 'r':
                         tag = optarg;                          cvs_specified_tag = optarg;
                         break;                          break;
                 default:                  default:
                         fatal("%s", cvs_cmd_update.cmd_synopsis);                          fatal("%s", cvs_cmd_update.cmd_synopsis);
Line 144 
Line 144 
 void  void
 cvs_update_enterdir(struct cvs_file *cf)  cvs_update_enterdir(struct cvs_file *cf)
 {  {
         char *entry;  
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
           char *entry, fpath[MAXPATHLEN];
   
         cvs_log(LP_TRACE, "cvs_update_enterdir(%s)", cf->file_path);          cvs_log(LP_TRACE, "cvs_update_enterdir(%s)", cf->file_path);
   
         cvs_file_classify(cf, NULL);          cvs_file_classify(cf, NULL);
   
         if (cf->file_status == DIR_CREATE && build_dirs == 1) {          if (cf->file_status == DIR_CREATE && build_dirs == 1) {
                 cvs_mkpath(cf->file_path);                  cvs_mkpath(cf->file_path, cvs_specified_tag);
                 if ((cf->fd = open(cf->file_path, O_RDONLY)) == -1)                  if ((cf->fd = open(cf->file_path, O_RDONLY)) == -1)
                         fatal("cvs_update_enterdir: `%s': %s",                          fatal("cvs_update_enterdir: `%s': %s",
                             cf->file_path, strerror(errno));                              cf->file_path, strerror(errno));
Line 166 
Line 166 
         } else if ((cf->file_status == DIR_CREATE && build_dirs == 0) ||          } else if ((cf->file_status == DIR_CREATE && build_dirs == 0) ||
                     cf->file_status == FILE_UNKNOWN) {                      cf->file_status == FILE_UNKNOWN) {
                 cf->file_status = FILE_SKIP;                  cf->file_status = FILE_SKIP;
           } else if (reset_stickies == 1) {
                   (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s",
                       cf->file_path, CVS_PATH_TAG);
                   (void)unlink(fpath);
           } else {
                   if (cvs_specified_tag != NULL)
                           cvs_write_tagfile(cf->file_path,
                                       cvs_specified_tag, NULL, 0);
   
                   cvs_parse_tagfile(cf->file_path,
                       &cvs_specified_tag, NULL, NULL);
         }          }
 }  }
   
Line 287 
Line 298 
         }          }
   
         flags = 0;          flags = 0;
         cvs_file_classify(cf, tag);          cvs_file_classify(cf, cvs_specified_tag);
   
         if ((cf->file_status == FILE_UPTODATE ||          if ((cf->file_status == FILE_UPTODATE ||
             cf->file_status == FILE_MODIFIED) && cf->file_ent != NULL &&              cf->file_status == FILE_MODIFIED) && cf->file_ent != NULL &&
Line 297 
Line 308 
                 else                  else
                         cf->file_status = FILE_CHECKOUT;                          cf->file_status = FILE_CHECKOUT;
                 cf->file_rcsrev = rcs_head_get(cf->file_rcs);                  cf->file_rcsrev = rcs_head_get(cf->file_rcs);
   
                   /* might be a bit overkill */
                   if (cvs_server_active == 1)
                           cvs_server_clear_sticky(cf->file_wd);
         }          }
   
         if (print && cf->file_status != FILE_UNKNOWN) {          if (print && cf->file_status != FILE_UNKNOWN) {
Line 335 
Line 350 
         case FILE_LOST:          case FILE_LOST:
         case FILE_CHECKOUT:          case FILE_CHECKOUT:
         case FILE_PATCH:          case FILE_PATCH:
                 if (tag != NULL)                  if (cvs_specified_tag != NULL)
                         flags = CO_SETSTICKY;                          flags = CO_SETSTICKY;
   
                 cvs_checkout_file(cf, cf->file_rcsrev, flags);                  cvs_checkout_file(cf, cf->file_rcsrev, flags);

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.104