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

Diff for /src/usr.bin/cvs/checkout.c between version 1.141 and 1.142

version 1.141, 2008/02/29 21:43:57 version 1.142, 2008/03/08 20:26:34
Line 98 
Line 98 
                         dflag = optarg;                          dflag = optarg;
                         checkout_target_dir = dflag;                          checkout_target_dir = dflag;
                         break;                          break;
                   case 'j':
                           if (cvs_join_rev1 == NULL)
                                   cvs_join_rev1 = optarg;
                           else if (cvs_join_rev2 == NULL)
                                   cvs_join_rev2 = optarg;
                           else
                                   fatal("too many -j options");
                           break;
                 case 'k':                  case 'k':
                         reset_option = 0;                          reset_option = 0;
                         koptstr = optarg;                          koptstr = optarg;
Line 459 
Line 467 
                         }                          }
   
                         cf->fd = open(cf->file_path,                          cf->fd = open(cf->file_path,
                             O_CREAT | O_WRONLY | O_TRUNC);                              O_CREAT | O_RDWR | O_TRUNC);
                         if (cf->fd == -1)                          if (cf->fd == -1)
                                 fatal("cvs_checkout_file: open: %s",                                  fatal("cvs_checkout_file: open: %s",
                                     strerror(errno));                                      strerror(errno));
   
                         rcs_rev_write_fd(cf->file_rcs, rnum, cf->fd, 0);                          rcs_rev_write_fd(cf->file_rcs, rnum, cf->fd, 0);
                 } else {                  } else {
                         cvs_merge_file(cf, 1);                          cvs_merge_file(cf, (cvs_join_rev1 == NULL));
                 }                  }
   
                 if (fchmod(cf->fd, 0644) == -1)                  if (fchmod(cf->fd, 0644) == -1)
Line 534 
Line 542 
                         ent = cvs_ent_open(cf->file_wd);                          ent = cvs_ent_open(cf->file_wd);
                         cvs_ent_add(ent, entry);                          cvs_ent_add(ent, entry);
                         cvs_ent_close(ent, ENT_SYNC);                          cvs_ent_close(ent, ENT_SYNC);
                           cf->file_ent = cvs_ent_parse(entry);
                         xfree(entry);                          xfree(entry);
                 }                  }
         } else {          } else {
                 if (co_flags & CO_MERGE) {                  if (co_flags & CO_MERGE) {
                         (void)unlink(cf->file_path);                          (void)unlink(cf->file_path);
                         cvs_merge_file(cf, 1);                          cvs_merge_file(cf, (cvs_join_rev1 == NULL));
                         tosend = cf->file_path;                          tosend = cf->file_path;
                         fd = cf->fd;                          fd = cf->fd;
                 }                  }

Legend:
Removed from v.1.141  
changed lines
  Added in v.1.142