Re: Why only show branch tags for directories?
[email protected] Mon, 28 Feb 2005 00:07:15 -0000
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Oliver, I agree that it's better to show the tag always no matter the type. I was even toying with the idea of adding the prefix to indicate the type of tag but it's probably overkill - people can see whether it's tag or date eaily and they also know their tags and branches most of the time so it's quite redundant. It also seems that CVS is setting the type marker different from what one would expect so it's better to just show it. E.g. after using the (non-branch) tag to checkout one can end with some folders marked with 'T' and other with 'N' types which confuses people as they expect consistant behavior. Richard has already explained the role of 'tmp' in the code. It would be better to use more descriptive name here, something like 'newLinePos' however. Feel free to remove the tag type check. And while you are at it - rename the 'tmp' too ;) Best Regards, Jerzy ----- Original Message ----- Wrom: NBOHMKHJYFMYX To: [email protected] Sent: Friday, February 11, 2005 13:26 Subject: [cvsgui-dev] Why only show branch tags for directories? I have just spent some time investigating an issue reported on the cvsgui list about tags sometimes not showing up for directories (see http://groups.yahoo.com/group/cvsgui/message/15433 or nntp://news.cvsnt.org/support.cvsgui/10819). I have identified the relevant code in CvsEntries.cpp, lines 1033-1041: if( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 ) { char* tmp = strchr(line, '\n'); if( tmp != NULL ) *tmp = '\0'; if( line[0] == 'T' ) tag = line + 1; } Is this deliberate? What about sticky tags (N) and dates (D)? Why not display them if CVS records them? How about simply changing the above to this: if( (line_length = getline(&line, &line_chars_allocated, fpin)) > 1 ) { char* tmp = strchr(line, '\n'); if( tmp != NULL ) *tmp = '\0'; tag = line + 1; } (BTW: What is this stuff about tmp in there? It doesn't appear to be used anywhere...) Comments? Oliver ---- ------------------ JID: [email protected] MSN: [email protected] ICQ: 18777742 (http://wwp.icq.com/18777742) Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui-dev/ To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui-dev/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/