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

Diff for /src/usr.bin/cvs/import.c between version 1.27 and 1.28

version 1.27, 2005/10/15 22:56:02 version 1.28, 2005/11/24 11:17:15
Line 221 
Line 221 
                 return (0);                  return (0);
         }          }
   
         if (dflag) {          if (dflag == 1) {
                 ctime_r(&(cf->cf_mtime), date);                  ctime_r(&(cf->cf_mtime), date);
                 sz = strlen(date);                  sz = strlen(date);
                 if ((sz > 0) && (date[sz - 1] == '\n'))                  if ((sz > 0) && (date[sz - 1] == '\n'))
Line 241 
Line 241 
 cvs_import_local(CVSFILE *cf, void *arg)  cvs_import_local(CVSFILE *cf, void *arg)
 {  {
         size_t len;          size_t len;
           int l;
         time_t stamp;          time_t stamp;
         char fpath[MAXPATHLEN], rpath[MAXPATHLEN], repo[MAXPATHLEN];          char fpath[MAXPATHLEN], rpath[MAXPATHLEN], repo[MAXPATHLEN];
         const char *comment;          const char *comment;
Line 280 
Line 281 
          * If -d was given, use the file's last modification time as the           * If -d was given, use the file's last modification time as the
          * timestamps for the initial revisions.           * timestamps for the initial revisions.
          */           */
         if (dflag) {          if (dflag == 1) {
                 if (stat(fpath, &fst) == -1) {                  if (stat(fpath, &fst) == -1) {
                         cvs_log(LP_ERRNO, "failed to stat %s", fpath);                          cvs_log(LP_ERRNO, "failed to stat %s", fpath);
                         return (CVS_EX_DATA);                          return (CVS_EX_DATA);
Line 294 
Line 295 
         } else          } else
                 stamp = -1;                  stamp = -1;
   
         snprintf(rpath, sizeof(rpath), "%s/%s%s",          l = snprintf(rpath, sizeof(rpath), "%s/%s%s",
             repo, fpath, RCS_FILE_EXT);              repo, fpath, RCS_FILE_EXT);
           if (l == -1 || l >= (int)sizeof(rpath)) {
                   errno = ENAMETOOLONG;
                   cvs_log(LP_ERRNO, "%s", rpath);
                   return (CVS_EX_DATA);
           }
   
         cvs_printf("N %s\n", fpath);          cvs_printf("N %s\n", fpath);
   
Line 364 
Line 370 
         /* add the vendor tag and release tag as symbols */          /* add the vendor tag and release tag as symbols */
         rcs_close(rf);          rcs_close(rf);
   
         if (dflag && (utimes(rpath, ts) == -1))          if ((dflag ==1) && (utimes(rpath, ts) == -1))
                 cvs_log(LP_ERRNO, "failed to timestamp RCS file");                  cvs_log(LP_ERRNO, "failed to timestamp RCS file");
   
         return (CVS_EX_OK);          return (CVS_EX_OK);

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28