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

Diff for /src/usr.bin/cvs/commit.c between version 1.70 and 1.71

version 1.70, 2006/06/06 05:18:23 version 1.71, 2006/06/07 07:01:12
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*  /*
  * Copyright (c) 2006 Joris Vink <joris@openbsd.org>   * Copyright (c) 2006 Joris Vink <joris@openbsd.org>
    * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 27 
Line 28 
 void    cvs_commit_check_conflicts(struct cvs_file *);  void    cvs_commit_check_conflicts(struct cvs_file *);
   
 static char *commit_diff_file(struct cvs_file *);  static char *commit_diff_file(struct cvs_file *);
   static void commit_desc_set(struct cvs_file *);
   
 struct  cvs_flisthead files_affected;  struct  cvs_flisthead files_affected;
 int     conflicts_found;  int     conflicts_found;
Line 226 
Line 228 
                 if (cf->file_rcs == NULL)                  if (cf->file_rcs == NULL)
                         fatal("cvs_commit_local: failed to create RCS file "                          fatal("cvs_commit_local: failed to create RCS file "
                             "for %s", cf->file_path);                              "for %s", cf->file_path);
   
                   commit_desc_set(cf);
         }          }
   
         cvs_printf("Checking in %s:\n", cf->file_path);          cvs_printf("Checking in %s:\n", cf->file_path);
Line 374 
Line 378 
         cvs_buf_putc(b3, '\0');          cvs_buf_putc(b3, '\0');
         delta = cvs_buf_release(b3);          delta = cvs_buf_release(b3);
         return (delta);          return (delta);
   }
   
   static void
   commit_desc_set(struct cvs_file *cf)
   {
           BUF *bp;
           int l;
           char *desc_path, *desc;
   
           desc_path = xmalloc(MAXPATHLEN);
           l = snprintf(desc_path, MAXPATHLEN, "%s/%s%s",
               CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT);
           if (l == -1 || l >= MAXPATHLEN)
                   fatal("commit_desc_set: overflow");
   
           if ((bp = cvs_buf_load(desc_path, BUF_AUTOEXT)) == NULL) {
                   xfree(desc_path);
                   return;
           }
   
           cvs_buf_putc(bp, '\0');
           desc = cvs_buf_release(bp);
   
           rcs_desc_set(cf->file_rcs, desc);
   
           (void)cvs_unlink(desc_path);
   
           xfree(desc);
           xfree(desc_path);
 }  }

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