/[cvs]/ccvs/src/subr.c
ViewVC logotype

Diff of /ccvs/src/subr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.72.4.31 by scjones, Fri Sep 2 19:37:35 2005 UTC revision 1.72.4.32 by dprice, Thu Sep 22 18:13:28 2005 UTC
# Line 649  make_message_rcslegal (message) Line 649  make_message_rcslegal (message)
649    
650    
651    
 /*  
  * file_has_conflict  
  *  
  * This function compares the timestamp of a file with ts_conflict set  
  * to the timestamp on the actual file and returns TRUE or FALSE based  
  * on the results.  
  *  
  * This function does not check for actual markers in the file and  
  * file_has_markers() function should be called when that is interesting.  
  *  
  * ASSUMPTIONS  
  *  The ts_conflict field is not NULL.  
  *  
  * RETURNS  
  *  TRUE        ts_conflict matches the current timestamp.  
  *  FALSE       The ts_conflict field does not match the file's  
  *              timestamp.  
  */  
 int  
 file_has_conflict (finfo, ts_conflict)  
     const struct file_info *finfo;  
     const char *ts_conflict;  
 {  
     char *filestamp;  
     int retcode;  
   
     /* If ts_conflict is NULL, there was no merge since the last  
      * commit and there can be no conflict.  
      */  
     assert (ts_conflict);  
   
     /*  
      * If the timestamp has changed and no  
      * conflict indicators are found, it isn't a  
      * conflict any more.  
      */  
   
     if (server_active)  
         retcode = ts_conflict[0] == '=';  
     else  
     {  
         filestamp = time_stamp (finfo->file);  
         retcode = !strcmp (ts_conflict, filestamp);  
         free (filestamp);  
     }  
   
     return retcode;  
 }  
   
   
   
652  /* Does the file FINFO contain conflict markers?  The whole concept  /* Does the file FINFO contain conflict markers?  The whole concept
653     of looking at the contents of the file to figure out whether there are     of looking at the contents of the file to figure out whether there are
654     unresolved conflicts is kind of bogus (people do want to manage files     unresolved conflicts is kind of bogus (people do want to manage files

Legend:
Removed from v.1.72.4.31  
changed lines
  Added in v.1.72.4.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26