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

version 1.69, 2007/01/03 22:28:30 version 1.70, 2007/01/12 23:32:01
Line 169 
Line 169 
         struct timeval tv[2];          struct timeval tv[2];
         char *p, *entry, rev[16], timebuf[64], tbuf[32], stickytag[32];          char *p, *entry, rev[16], timebuf[64], tbuf[32], stickytag[32];
   
           nbp = NULL;
   
         rcsnum_tostr(rnum, rev, sizeof(rev));          rcsnum_tostr(rnum, rev, sizeof(rev));
   
         cvs_log(LP_TRACE, "cvs_checkout_file(%s, %s, %d) -> %s",          cvs_log(LP_TRACE, "cvs_checkout_file(%s, %s, %d) -> %s",
             cf->file_path, rev, flags,              cf->file_path, rev, flags,
             (cvs_server_active) ? "to client" : "to disk");              (cvs_server_active) ? "to client" : "to disk");
   
         nbp = rcs_kwexp_buf(bp, cf->file_rcs, rnum);          if (bp != NULL)
   
         if (flags & CO_DUMP) {          if (flags & CO_DUMP) {
                 if (cvs_server_active) {                  if (cvs_server_active) {
                         cvs_printf("dump file %s to client\n", cf->file_path);                          cvs_printf("dump file %s to client\n", cf->file_path);
                 } else {                  } else {
                         if (cvs_buf_write_fd(nbp, STDOUT_FILENO) == -1)                          if (nbp == NULL) {
                                 fatal("cvs_checkout_file: %s", strerror(errno));                                  rcs_rev_write_fd(cf->file_rcs, rnum,
                                       STDOUT_FILENO, 1);
                           } else {
                                   if (cvs_buf_write_fd(nbp, STDOUT_FILENO == -1))
                                           fatal("cvs_checkout_file: %s", strerror(errno));
                           }
                 }                  }
   
                 cvs_buf_free(nbp);  
                 return;                  return;
         }          }
   
Line 203 
Line 209 
                 if (cf->fd == -1)                  if (cf->fd == -1)
                         fatal("cvs_checkout_file: open: %s", strerror(errno));                          fatal("cvs_checkout_file: open: %s", strerror(errno));
   
                 if (cvs_buf_write_fd(nbp, cf->fd) == -1)                  if (nbp == NULL) {
                         fatal("cvs_checkout_file: %s", strerror(errno));                          rcs_rev_write_fd(cf->file_rcs, rnum, cf->fd, 1);
                   } else {
                 cvs_buf_free(nbp);                          if (cvs_buf_write_fd(nbp, STDOUT_FILENO == -1))
                                   fatal("cvs_checkout_file: %s", strerror(errno));
                   }
   
                 if (fchmod(cf->fd, 0644) == -1)                  if (fchmod(cf->fd, 0644) == -1)
                         fatal("cvs_checkout_file: fchmod: %s", strerror(errno));                          fatal("cvs_checkout_file: fchmod: %s", strerror(errno));

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