[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.90 and 1.91

version 1.90, 2007/01/11 18:06:49 version 1.91, 2007/01/12 17:25:33
Line 26 
Line 26 
 void    cvs_commit_local(struct cvs_file *);  void    cvs_commit_local(struct cvs_file *);
 void    cvs_commit_check_files(struct cvs_file *);  void    cvs_commit_check_files(struct cvs_file *);
   
 static char *commit_diff_file(struct cvs_file *);  static BUF *commit_diff_file(struct cvs_file *);
 static void commit_desc_set(struct cvs_file *);  static void commit_desc_set(struct cvs_file *);
   
 struct  cvs_flisthead files_affected;  struct  cvs_flisthead files_affected;
Line 200 
Line 200 
 void  void
 cvs_commit_local(struct cvs_file *cf)  cvs_commit_local(struct cvs_file *cf)
 {  {
         BUF *b;          BUF *b, *d;
         int isnew;          int isnew;
         int l, openflags, rcsflags;          int l, openflags, rcsflags;
         char *f, rbuf[24], nbuf[24];          char rbuf[24], nbuf[24];
         char *d = NULL;  
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         char *attic, *repo, *rcsfile;          char *attic, *repo, *rcsfile;
   
Line 293 
Line 292 
                         fatal("cvs_commit_local: failed to load file");                          fatal("cvs_commit_local: failed to load file");
         }          }
   
         cvs_buf_putc(b, '\0');  
         f = cvs_buf_release(b);  
   
         if (isnew == 0) {          if (isnew == 0) {
                 if (rcs_deltatext_set(cf->file_rcs,                  if (rcs_deltatext_set(cf->file_rcs,
                     cf->file_rcs->rf_head, d) == -1)                      cf->file_rcs->rf_head, d) == -1)
Line 305 
Line 301 
         if (rcs_rev_add(cf->file_rcs, RCS_HEAD_REV, logmsg, -1, NULL) == -1)          if (rcs_rev_add(cf->file_rcs, RCS_HEAD_REV, logmsg, -1, NULL) == -1)
                 fatal("cvs_commit_local: failed to add new revision");                  fatal("cvs_commit_local: failed to add new revision");
   
         if (rcs_deltatext_set(cf->file_rcs, cf->file_rcs->rf_head, f) == -1)          if (rcs_deltatext_set(cf->file_rcs, cf->file_rcs->rf_head, b) == -1)
                 fatal("cvs_commit_local: failed to set new HEAD delta");                  fatal("cvs_commit_local: failed to set new HEAD delta");
   
         xfree(f);  
   
         if (isnew == 0)  
                 xfree(d);  
   
         if (cf->file_status == FILE_REMOVED) {          if (cf->file_status == FILE_REMOVED) {
                 if (rcs_state_set(cf->file_rcs,                  if (rcs_state_set(cf->file_rcs,
                     cf->file_rcs->rf_head, RCS_STATE_DEAD) == -1)                      cf->file_rcs->rf_head, RCS_STATE_DEAD) == -1)
Line 391 
Line 382 
         }          }
 }  }
   
 static char *  static BUF *
 commit_diff_file(struct cvs_file *cf)  commit_diff_file(struct cvs_file *cf)
 {  {
         char*delta,  *p1, *p2;          char *p1, *p2;
         BUF *b1, *b2, *b3;          BUF *b1, *b2, *b3;
   
         if (cf->file_status == FILE_MODIFIED ||          if (cf->file_status == FILE_MODIFIED ||
Line 428 
Line 419 
         if (cvs_diffreg(p1, p2, b3) == D_ERROR)          if (cvs_diffreg(p1, p2, b3) == D_ERROR)
                 fatal("commit_diff_file: failed to get RCS patch");                  fatal("commit_diff_file: failed to get RCS patch");
   
         cvs_buf_putc(b3, '\0');          return (b3);
         delta = cvs_buf_release(b3);  
         return (delta);  
 }  }
   
 static void  static void

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91