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

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

version 1.9, 2005/04/19 15:36:39 version 1.10, 2005/04/21 18:54:50
Line 52 
Line 52 
         NULL,          NULL,
         cvs_remove_file,          cvs_remove_file,
         NULL, NULL,          NULL, NULL,
         0,          CF_IGNORE | CF_RECURSE,
         CVS_REQ_REMOVE,          CVS_REQ_REMOVE,
         CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC          CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC
 };  };
Line 114 
Line 114 
         cvs_file_getpath(cf, fpath, sizeof(fpath));          cvs_file_getpath(cf, fpath, sizeof(fpath));
   
         if (root->cr_method != CVS_METHOD_LOCAL) {          if (root->cr_method != CVS_METHOD_LOCAL) {
                 if (cvs_sendentry(root, cf) < 0) {  
                         return (CVS_EX_PROTO);  
                 }  
   
         } else {  
                 /* if -f option is used, physically remove the file */                  /* if -f option is used, physically remove the file */
                 if (force_remove == 1) {                  if (force_remove == 1) {
                         if((unlink(fpath) == -1) && (errno != ENOENT)) {                          if((unlink(fpath) == -1) && (errno != ENOENT)) {
                                 cvs_log(LP_ERRNO, "failed to unlink `%s'",                                  cvs_log(LP_ERRNO,
                                     fpath);                                      "failed to unlink `%s'", fpath);
                                 return (CVS_EX_FILE);                                  return (CVS_EX_FILE);
                         }                          }
                 }                  }
   
                   if (cvs_sendentry(root, cf) < 0)
                           return (CVS_EX_PROTO);
   
                   if (cf->cf_cvstat != CVS_FST_LOST && force_remove != 1) {
                           if (cvs_sendreq(root, CVS_REQ_MODIFIED,
                               CVS_FILE_NAME(cf)) < 0) {
                                   return (CVS_EX_PROTO);
                           }
                   }
   
                   if (cvs_sendfile(root, fpath) < 0)
                           return (CVS_EX_PROTO);
           } else {
                 cvs_log(LP_INFO, "scheduling file `%s' for removal",                  cvs_log(LP_INFO, "scheduling file `%s' for removal",
                     CVS_FILE_NAME(cf));                      CVS_FILE_NAME(cf));
                 cvs_log(LP_INFO,                  cvs_log(LP_INFO,

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