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

Diff for /src/usr.bin/cvs/status.c between version 1.77 and 1.78

version 1.77, 2007/09/22 16:01:22 version 1.78, 2008/01/10 09:37:26
Line 132 
Line 132 
                 return;                  return;
         }          }
   
           head = rcs_head_get(cf->file_rcs);
           if (head == NULL && cf->file_status != FILE_REMOVE_ENTRY)
                   return;
   
         cvs_printf("%s\n", CVS_STATUS_SEP);          cvs_printf("%s\n", CVS_STATUS_SEP);
   
         status = status_tab[cf->file_status];          status = status_tab[cf->file_status];
Line 141 
Line 145 
   
         if (cf->file_status == FILE_LOST ||          if (cf->file_status == FILE_LOST ||
             cf->file_status == FILE_UNKNOWN ||              cf->file_status == FILE_UNKNOWN ||
               cf->file_status == FILE_REMOVE_ENTRY ||
             (cf->file_rcs != NULL && cf->in_attic == 1 && cf->fd == -1)) {              (cf->file_rcs != NULL && cf->in_attic == 1 && cf->fd == -1)) {
                 (void)xsnprintf(buf, sizeof(buf), "no file %s\t",                  (void)xsnprintf(buf, sizeof(buf), "no file %s\t",
                     cf->file_name);                      cf->file_name);
Line 153 
Line 158 
         if (cf->file_ent == NULL) {          if (cf->file_ent == NULL) {
                 (void)xsnprintf(buf, sizeof(buf),                  (void)xsnprintf(buf, sizeof(buf),
                     "No entry for %s", cf->file_name);                      "No entry for %s", cf->file_name);
         } else if (cf->file_status == FILE_ADDED) {          } else if (cf->file_status == FILE_ADDED ||
                      cf->file_status == FILE_REMOVE_ENTRY) {
                 len = strlcpy(buf, "New file!", sizeof(buf));                  len = strlcpy(buf, "New file!", sizeof(buf));
                 if (len >= sizeof(buf))                  if (len >= sizeof(buf))
                         fatal("cvs_status_local: truncation");                          fatal("cvs_status_local: truncation");
Line 181 
Line 187 
         cvs_printf("   Working revision:\t%s\n", buf);          cvs_printf("   Working revision:\t%s\n", buf);
   
         buf[0] = '\0';          buf[0] = '\0';
         if (cf->file_rcs == NULL) {          if (cf->file_rcs == NULL || head == NULL) {
                 len = strlcat(buf, "No revision control file", sizeof(buf));                  len = strlcat(buf, "No revision control file", sizeof(buf));
                 if (len >= sizeof(buf))                  if (len >= sizeof(buf))
                         fatal("cvs_status_local: truncation");                          fatal("cvs_status_local: truncation");
         } else {          } else {
                 head = rcs_head_get(cf->file_rcs);  
                 rcsnum_tostr(head, revbuf, sizeof(revbuf));                  rcsnum_tostr(head, revbuf, sizeof(revbuf));
                 rcsnum_free(head);                  rcsnum_free(head);
                 (void)xsnprintf(buf, sizeof(buf), "%s\t%s", revbuf,                  (void)xsnprintf(buf, sizeof(buf), "%s\t%s", revbuf,

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78