[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.69 and 1.70

version 1.69, 2006/05/31 22:25:59 version 1.70, 2006/06/03 19:07:13
Line 25 
Line 25 
 int     cvs_update(int, char **);  int     cvs_update(int, char **);
 int     prune_dirs = 0;  int     prune_dirs = 0;
 int     build_dirs = 0;  int     build_dirs = 0;
   int     reset_stickies = 0;
   static char *tag = NULL;
   
 static void update_clear_conflict(struct cvs_file *);  static void update_clear_conflict(struct cvs_file *);
   
Line 52 
Line 54 
         while ((ch = getopt(argc, argv, cvs_cmd_update.cmd_opts)) != -1) {          while ((ch = getopt(argc, argv, cvs_cmd_update.cmd_opts)) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'A':                  case 'A':
                           reset_stickies = 1;
                         break;                          break;
                 case 'C':                  case 'C':
                 case 'D':                  case 'D':
Line 81 
Line 84 
                 case 'R':                  case 'R':
                         break;                          break;
                 case 'r':                  case 'r':
                           tag = optarg;
                         break;                          break;
                 default:                  default:
                         fatal("%s", cvs_cmd_update.cmd_synopsis);                          fatal("%s", cvs_cmd_update.cmd_synopsis);
Line 238 
Line 242 
 void  void
 cvs_update_local(struct cvs_file *cf)  cvs_update_local(struct cvs_file *cf)
 {  {
         int ret;  
         BUF *bp;          BUF *bp;
           int ret, flags;
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
   
         cvs_log(LP_TRACE, "cvs_update_local(%s)", cf->file_path);          cvs_log(LP_TRACE, "cvs_update_local(%s)", cf->file_path);
Line 258 
Line 262 
          * the bp buffer will be released inside rcs_kwexp_buf,           * the bp buffer will be released inside rcs_kwexp_buf,
          * which is called from cvs_checkout_file().           * which is called from cvs_checkout_file().
          */           */
           flags = 0;
         bp = NULL;          bp = NULL;
         cvs_file_classify(cf, NULL, 1);          cvs_file_classify(cf, tag, 1);
   
           if (cf->file_status == FILE_UPTODATE && cf->file_ent != NULL &&
               cf->file_ent->ce_tag != NULL && reset_stickies == 1) {
                   cf->file_status = FILE_CHECKOUT;
                   cf->file_rcsrev = rcs_head_get(cf->file_rcs);
           }
   
         switch (cf->file_status) {          switch (cf->file_status) {
         case FILE_UNKNOWN:          case FILE_UNKNOWN:
                 cvs_printf("? %s\n", cf->file_path);                  cvs_printf("? %s\n", cf->file_path);
Line 291 
Line 302 
                 if (bp == NULL)                  if (bp == NULL)
                         fatal("cvs_update_local: failed to get HEAD");                          fatal("cvs_update_local: failed to get HEAD");
   
                 cvs_checkout_file(cf, cf->file_rcsrev, bp, 0);                  if (tag != NULL)
                           flags = CO_SETSTICKY;
   
                   cvs_checkout_file(cf, cf->file_rcsrev, bp, flags);
                 cvs_printf("U %s\n", cf->file_path);                  cvs_printf("U %s\n", cf->file_path);
                 break;                  break;
         case FILE_MERGE:          case FILE_MERGE:

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70