[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.70 and 1.71

version 1.70, 2007/01/12 23:32:01 version 1.71, 2007/01/12 23:56:11
Line 162 
Line 162 
 void  void
 cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, BUF *bp, int flags)  cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, BUF *bp, int flags)
 {  {
         BUF *nbp;  
         int l, oflags, exists;          int l, oflags, exists;
         time_t rcstime;          time_t rcstime;
         CVSENTRIES *ent;          CVSENTRIES *ent;
         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");
   
         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 (nbp == NULL) {                          rcs_rev_write_fd(cf->file_rcs, rnum,
                                 rcs_rev_write_fd(cf->file_rcs, rnum,                              STDOUT_FILENO, 1);
                                     STDOUT_FILENO, 1);  
                         } else {  
                                 if (cvs_buf_write_fd(nbp, STDOUT_FILENO == -1))  
                                         fatal("cvs_checkout_file: %s", strerror(errno));  
                         }  
                 }                  }
   
                 return;                  return;
Line 209 
Line 199 
                 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 (nbp == NULL) {                  rcs_rev_write_fd(cf->file_rcs, rnum, cf->fd, 1);
                         rcs_rev_write_fd(cf->file_rcs, rnum, cf->fd, 1);  
                 } else {  
                         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));
Line 279 
Line 264 
                 cvs_remote_output(entry);                  cvs_remote_output(entry);
   
                 if (!(flags & CO_COMMIT)) {                  if (!(flags & CO_COMMIT)) {
   #if 0
                         cvs_remote_output("u=rw,g=rw,o=rw");                          cvs_remote_output("u=rw,g=rw,o=rw");
   
                         /* XXX */                          /* XXX */
Line 287 
Line 273 
                         if (cvs_buf_write_fd(nbp, STDOUT_FILENO) == -1)                          if (cvs_buf_write_fd(nbp, STDOUT_FILENO) == -1)
                                 fatal("cvs_checkout_file: failed to send file");                                  fatal("cvs_checkout_file: failed to send file");
                         cvs_buf_free(nbp);                          cvs_buf_free(nbp);
   #endif
                 }                  }
   
                 if (p != NULL)                  if (p != NULL)

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