[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.7 and 1.8

version 1.7, 2005/04/12 14:58:40 version 1.8, 2005/04/18 21:02:50
Line 94 
Line 94 
         int ret;          int ret;
         char fpath[MAXPATHLEN];          char fpath[MAXPATHLEN];
         struct cvsroot *root;          struct cvsroot *root;
         CVSENTRIES *entfile;  
         struct cvs_ent *ent;  
   
         ret = 0;          ret = 0;
         ent = NULL;  
         root = CVS_DIR_ROOT(cf);          root = CVS_DIR_ROOT(cf);
   
         if (cf->cf_type == DT_DIR) {          if (cf->cf_type == DT_DIR) {
Line 115 
Line 112 
   
         cvs_file_getpath(cf, fpath, sizeof(fpath));          cvs_file_getpath(cf, fpath, sizeof(fpath));
   
         entfile = cvs_ent_open(dirname(fpath), O_RDWR);  
         if (entfile == NULL) {  
                 cvs_log(LP_ERR, "failed to remove `%s'", fpath);  
                 return (CVS_EX_FILE);  
         }  
   
         ent = cvs_ent_get(entfile, CVS_FILE_NAME(cf));  
   
         if (root->cr_method != CVS_METHOD_LOCAL) {          if (root->cr_method != CVS_METHOD_LOCAL) {
                 if (ent != NULL)                  ret = cvs_sendentry(root, cf);
                         ret = cvs_sendentry(root, ent);  
         } else {          } 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) {
Line 142 
Line 130 
                     "use `%s commit' to remove this file permanently",                      "use `%s commit' to remove this file permanently",
                     __progname);                      __progname);
         }          }
   
         cvs_ent_close(entfile);  
   
         return (ret);          return (ret);
 }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8