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

Diff for /src/usr.bin/cvs/diff.c between version 1.9 and 1.10

version 1.9, 2004/12/06 02:46:47 version 1.10, 2004/12/06 21:03:12
Line 418 
Line 418 
   
         if (argc == 0) {          if (argc == 0) {
                 cvs_files = cvs_file_get(".", flags);                  cvs_files = cvs_file_get(".", flags);
         }          } else
         else  
                 cvs_files = cvs_file_getspec(argv, argc, 0);                  cvs_files = cvs_file_getspec(argv, argc, 0);
         if (cvs_files == NULL)          if (cvs_files == NULL)
                 return (EX_DATAERR);                  return (EX_DATAERR);
Line 453 
Line 452 
         if (dap->rev1 != NULL) {          if (dap->rev1 != NULL) {
                 cvs_sendarg(root, "-r", 0);                  cvs_sendarg(root, "-r", 0);
                 cvs_sendarg(root, dap->rev1, 1);                  cvs_sendarg(root, dap->rev1, 1);
         }          } else if (dap->date1 != NULL) {
         else if (dap->date1 != NULL) {  
                 cvs_sendarg(root, "-D", 0);                  cvs_sendarg(root, "-D", 0);
                 cvs_sendarg(root, dap->date1, 1);                  cvs_sendarg(root, dap->date1, 1);
         }          }
         if (dap->rev2 != NULL) {          if (dap->rev2 != NULL) {
                 cvs_sendarg(root, "-r", 0);                  cvs_sendarg(root, "-r", 0);
                 cvs_sendarg(root, dap->rev2, 1);                  cvs_sendarg(root, dap->rev2, 1);
         }          } else if (dap->date2 != NULL) {
         else if (dap->date2 != NULL) {  
                 cvs_sendarg(root, "-D", 0);                  cvs_sendarg(root, "-D", 0);
                 cvs_sendarg(root, dap->date2, 1);                  cvs_sendarg(root, dap->date2, 1);
         }          }
Line 496 
Line 493 
                         root = cfp->cf_parent->cf_ddat->cd_root;                          root = cfp->cf_parent->cf_ddat->cd_root;
                         cvs_sendreq(root, CVS_REQ_QUESTIONABLE,                          cvs_sendreq(root, CVS_REQ_QUESTIONABLE,
                             CVS_FILE_NAME(cfp));                              CVS_FILE_NAME(cfp));
                 }                  } else {
                 else {  
                         root = cfp->cf_ddat->cd_root;                          root = cfp->cf_ddat->cd_root;
                         if ((cfp->cf_parent == NULL) ||                          if ((cfp->cf_parent == NULL) ||
                             (root != cfp->cf_parent->cf_ddat->cd_root)) {                              (root != cfp->cf_parent->cf_ddat->cd_root)) {
Line 518 
Line 514 
                 dir = cvs_file_getpath(cfp->cf_parent, dfpath, sizeof(dfpath));                  dir = cvs_file_getpath(cfp->cf_parent, dfpath, sizeof(dfpath));
                 root = cfp->cf_parent->cf_ddat->cd_root;                  root = cfp->cf_parent->cf_ddat->cd_root;
                 repo = cfp->cf_parent->cf_ddat->cd_repo;                  repo = cfp->cf_parent->cf_ddat->cd_repo;
         }          } else {
         else {  
                 dir = ".";                  dir = ".";
                 root = NULL;                  root = NULL;
                 repo = NULL;                  repo = NULL;
Line 557 
Line 552 
         if (root->cr_method != CVS_METHOD_LOCAL) {          if (root->cr_method != CVS_METHOD_LOCAL) {
                 cvs_sendreq(root, CVS_REQ_MODIFIED, CVS_FILE_NAME(cfp));                  cvs_sendreq(root, CVS_REQ_MODIFIED, CVS_FILE_NAME(cfp));
                 cvs_sendfile(root, diff_file);                  cvs_sendfile(root, diff_file);
         }          } else {
         else {  
                 snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s",                  snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s",
                     root->cr_dir, repo, diff_file, RCS_FILE_EXT);                      root->cr_dir, repo, diff_file, RCS_FILE_EXT);
   
Line 587 
Line 581 
                         r2 = rcsnum_alloc();                          r2 = rcsnum_alloc();
                         rcsnum_aton(dap->rev2, NULL, r2);                          rcsnum_aton(dap->rev2, NULL, r2);
                         b2 = rcs_getrev(rf, r2);                          b2 = rcs_getrev(rf, r2);
                 }                  } else {
                 else {  
                         b2 = cvs_buf_load(diff_file, BUF_AUTOEXT);                          b2 = cvs_buf_load(diff_file, BUF_AUTOEXT);
                 }                  }
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10