[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.132 and 1.133

version 1.132, 2008/03/09 03:14:52 version 1.133, 2008/05/17 21:06:44
Line 365 
Line 365 
   
                 if (tag != NULL) {                  if (tag != NULL) {
                         rcsnum_free(crev);                          rcsnum_free(crev);
                           rcsnum_free(rrev);
                           brev = rcs_sym_getrev(cf->file_rcs, tag);
                         crev = rcs_translate_tag(tag, cf->file_rcs);                          crev = rcs_translate_tag(tag, cf->file_rcs);
                         if (crev == NULL) {                          if (brev == NULL || crev == NULL) {
                                 fatal("failed to resolve existing tag: %s",                                  fatal("failed to resolve existing tag: %s",
                                     tag);                                      tag);
                         }                          }
   
                         if (RCSNUM_ISBRANCHREV(crev)) {                          rrev = rcsnum_alloc();
                           rcsnum_cpy(brev, rrev, brev->rn_len - 1);
   
                           if (RCSNUM_ISBRANCHREV(crev) &&
                               rcsnum_cmp(crev, rrev, 0)) {
                                 nrev = rcsnum_alloc();                                  nrev = rcsnum_alloc();
                                 rcsnum_cpy(crev, nrev, 0);                                  rcsnum_cpy(crev, nrev, 0);
                                 rcsnum_inc(nrev);                                  rcsnum_inc(nrev);
                         } else if (!RCSNUM_ISBRANCH(crev)) {                          } else if (!RCSNUM_ISBRANCH(crev)) {
                                 brev = rcs_sym_getrev(cf->file_rcs, tag);  
                                 if (brev == NULL)  
                                         fatal("no more tag?");  
                                 nrev = rcsnum_brtorev(brev);                                  nrev = rcsnum_brtorev(brev);
                                 if (nrev == NULL)                                  if (nrev == NULL)
                                         fatal("failed to create branch rev");                                          fatal("failed to create branch rev");
                                 rcsnum_free(brev);  
                         } else {                          } else {
                                 fatal("this isnt suppose to happen, honestly");                                  fatal("this isnt suppose to happen, honestly");
                         }                          }
   
                           rcsnum_free(brev);
                         rcsnum_free(rrev);                          rcsnum_free(rrev);
                         rrev = rcsnum_branch_root(nrev);                          rrev = rcsnum_branch_root(nrev);
   

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133