[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.140 and 1.141

version 1.140, 2008/02/27 22:34:04 version 1.141, 2008/02/29 21:43:57
Line 424 
Line 424 
 void  void
 cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)  cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)
 {  {
         int cf_kflag, oflags, exists, fd;          int cf_kflag, exists, fd;
         time_t rcstime;          time_t rcstime;
         CVSENTRIES *ent;          CVSENTRIES *ent;
         struct timeval tv[2];          struct timeval tv[2];
Line 450 
Line 450 
         }          }
   
         if (cvs_server_active == 0) {          if (cvs_server_active == 0) {
                   (void)unlink(cf->file_path);
   
                 if (!(co_flags & CO_MERGE)) {                  if (!(co_flags & CO_MERGE)) {
                         oflags = O_WRONLY | O_TRUNC;  
                         if (cf->fd != -1) {                          if (cf->fd != -1) {
                                 exists = 1;                                  exists = 1;
                                 (void)close(cf->fd);                                  (void)close(cf->fd);
                         } else  {  
                                 oflags |= O_CREAT;  
                         }                          }
   
                         cf->fd = open(cf->file_path, oflags);                          cf->fd = open(cf->file_path,
                               O_CREAT | O_WRONLY | 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));
Line 538 
Line 538 
                 }                  }
         } else {          } else {
                 if (co_flags & CO_MERGE) {                  if (co_flags & CO_MERGE) {
                           (void)unlink(cf->file_path);
                         cvs_merge_file(cf, 1);                          cvs_merge_file(cf, 1);
                         tosend = cf->file_path;                          tosend = cf->file_path;
                         fd = cf->fd;                          fd = cf->fd;

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