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

Diff for /src/usr.bin/cvs/file.c between version 1.217 and 1.218

version 1.217, 2008/02/08 22:07:50 version 1.218, 2008/02/09 11:17:02
Line 703 
Line 703 
         notag = 0;          notag = 0;
         cf->file_flags |= FILE_HAS_TAG;          cf->file_flags |= FILE_HAS_TAG;
         if (tag != NULL && cf->file_rcs != NULL) {          if (tag != NULL && cf->file_rcs != NULL) {
                 if ((cf->file_rcsrev = rcs_translate_tag(tag,                  if ((cf->file_rcsrev = rcs_translate_tag(tag, cf->file_rcs))
                     cf->file_rcs)) != NULL) {                      != NULL) {
                         rcsnum_tostr(cf->file_rcsrev, r1, sizeof(r1));                          rcsnum_tostr(cf->file_rcsrev, r1, sizeof(r1));
                 } else {                  } else {
                         cf->file_rcsrev = rcs_head_get(cf->file_rcs);                          cf->file_rcsrev = rcs_translate_tag(NULL, cf->file_rcs);
                         if (cf->file_rcsrev != NULL) {                          if (cf->file_rcsrev != NULL) {
                                 notag = 1;                                  notag = 1;
                                 cf->file_flags &= ~FILE_HAS_TAG;                                  cf->file_flags &= ~FILE_HAS_TAG;
Line 717 
Line 717 
                 cf->file_rcsrev = rcsnum_alloc();                  cf->file_rcsrev = rcsnum_alloc();
                 rcsnum_cpy(cf->file_ent->ce_rev, cf->file_rcsrev, 0);                  rcsnum_cpy(cf->file_ent->ce_rev, cf->file_rcsrev, 0);
         } else if (cf->file_rcs != NULL) {          } else if (cf->file_rcs != NULL) {
                 cf->file_rcsrev = rcs_head_get(cf->file_rcs);                  cf->file_rcsrev = rcs_translate_tag(NULL, cf->file_rcs);
         } else {          } else {
                 cf->file_rcsrev = NULL;                  cf->file_rcsrev = NULL;
         }          }
Line 745 
Line 745 
         }          }
   
         if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL &&          if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL &&
             !RCSNUM_ISBRANCH(cf->file_rcsrev)) {              cf->file_rcsrev != NULL && !RCSNUM_ISBRANCH(cf->file_rcsrev)) {
                 b1 = rcs_rev_getbuf(cf->file_rcs, cf->file_rcsrev, 0);                  b1 = rcs_rev_getbuf(cf->file_rcs, cf->file_rcsrev, 0);
                 if (b1 == NULL)                  if (b1 == NULL)
                         fatal("failed to get HEAD revision for comparison");                          fatal("failed to get HEAD revision for comparison");
Line 771 
Line 771 
                 if (!strcmp(state, RCS_STATE_DEAD))                  if (!strcmp(state, RCS_STATE_DEAD))
                         rcsdead = 1;                          rcsdead = 1;
   
                 if (tag == NULL &&cf->in_attic &&                  if (cvs_specified_date == 0 && tag == NULL && cf->in_attic &&
                     !RCSNUM_ISBRANCHREV(cf->file_rcsrev))                      !RCSNUM_ISBRANCHREV(cf->file_rcsrev))
                         rcsdead = 1;                          rcsdead = 1;
   
Line 798 
Line 798 
                         } else if (cvs_cmdop != CVS_OP_ADD) {                          } else if (cvs_cmdop != CVS_OP_ADD) {
                                 cf->file_status = FILE_UNKNOWN;                                  cf->file_status = FILE_UNKNOWN;
                         }                          }
                 } else if (notag == 0) {                  } else if (notag == 0 && cf->file_rcsrev != NULL) {
                         cf->file_status = FILE_CHECKOUT;                          cf->file_status = FILE_CHECKOUT;
                 } else {                  } else {
                         cf->file_status = FILE_UPTODATE;                          cf->file_status = FILE_UPTODATE;
Line 846 
Line 846 
                 }                  }
                 break;                  break;
         case CVS_ENT_REG:          case CVS_ENT_REG:
                 if (cf->file_rcs == NULL || rcsdead == 1 ||                  if (cf->file_rcs == NULL || cf->file_rcsrev == NULL ||
                     (reset_stickies == 1 && cf->in_attic == 1) ||                      rcsdead == 1 || (reset_stickies == 1 &&
                     (notag == 1 && tag != NULL)) {                      cf->in_attic == 1)|| (notag == 1 && tag != NULL)) {
                         if (cf->fd == -1 && server_has_file == 0) {                          if (cf->fd == -1 && server_has_file == 0) {
                                 cvs_log(LP_NOTICE,                                  cvs_log(LP_NOTICE,
                                     "warning: %s's entry exists but"                                      "warning: %s's entry exists but"
Line 874 
Line 874 
                                         cf->file_status = FILE_UNLINK;                                          cf->file_status = FILE_UNLINK;
                                 }                                  }
                         }                          }
                 } else {                  } else if (cf->file_rcsrev == NULL) {
                           cf->file_status = FILE_UNLINK;
                   } else{
                         if (cf->fd == -1 && server_has_file == 0) {                          if (cf->fd == -1 && server_has_file == 0) {
                                 if (cvs_cmdop != CVS_OP_REMOVE) {                                  if (cvs_cmdop != CVS_OP_REMOVE) {
                                         cvs_log(LP_NOTICE,                                          cvs_log(LP_NOTICE,
Line 882 
Line 884 
                                             cf->file_path);                                              cf->file_path);
                                 }                                  }
                                 cf->file_status = FILE_LOST;                                  cf->file_status = FILE_LOST;
                           } else if (cf->file_rcsrev == NULL) {
                                   cf->file_status = FILE_UNLINK;
                         } else {                          } else {
                                 if (ismodified == 1)                                  if (ismodified == 1)
                                         cf->file_status = FILE_MODIFIED;                                          cf->file_status = FILE_MODIFIED;

Legend:
Removed from v.1.217  
changed lines
  Added in v.1.218