[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.150 and 1.151

version 1.150, 2010/07/23 21:46:05 version 1.151, 2011/04/20 18:41:40
Line 187 
Line 187 
                                 fatal("no log message specified");                                  fatal("no log message specified");
                 } else if (logmsg == NULL) {                  } else if (logmsg == NULL) {
                         logmsg = cvs_logmsg_create(NULL, &files_added,                          logmsg = cvs_logmsg_create(NULL, &files_added,
                             &files_removed, &files_modified);                              &files_removed, &files_modified);
                         if (logmsg == NULL)                          if (logmsg == NULL)
                                 fatal("This shouldnt happen, honestly!");                                  fatal("This shouldnt happen, honestly!");
                 }                  }
Line 728 
Line 728 
 static BUF *  static BUF *
 commit_diff(struct cvs_file *cf, RCSNUM *rev, int reverse)  commit_diff(struct cvs_file *cf, RCSNUM *rev, int reverse)
 {  {
         int fd1, fd2, f;          int fd1, fd2, d;
         char *p1, *p2, *p;          char *p1, *p2;
         BUF *b;          BUF *b;
   
         (void)xasprintf(&p1, "%s/diff1.XXXXXXXXXX", cvs_tmpdir);          (void)xasprintf(&p1, "%s/diff1.XXXXXXXXXX", cvs_tmpdir);
Line 750 
Line 750 
   
         diff_format = D_RCSDIFF;          diff_format = D_RCSDIFF;
   
         if (reverse == 1) {          if (reverse == 1)
                 p = p1;                  d = diffreg(p2, p1, fd2, fd1, b, D_FORCEASCII);
                 p1 = p2;          else
                 p2 = p;                  d = diffreg(p1, p2, fd1, fd2, b, D_FORCEASCII);
           if (d == D_ERROR)
                 f = fd1;  
                 fd1 = fd2;  
                 fd2 = f;  
         }  
   
         if (diffreg(p1, p2, fd1, fd2, b, D_FORCEASCII) == D_ERROR)  
                 fatal("commit_diff: failed to get RCS patch");                  fatal("commit_diff: failed to get RCS patch");
   
         close(fd1);          close(fd1);

Legend:
Removed from v.1.150  
changed lines
  Added in v.1.151