Allen,<br><br>That is a good point, I didn't think of the path issue! I believe the LSB specifies /usr/bin as the RCS default, but other platforms may pop it in a different part of the tree. Is there a way to just remove "." from the QProcess $PATH? If not I would suggest "/bin:/usr/bin:/usr/local/bin" (but someone could be creative and stick it in /opt/rcs-
5.7/bin or something). RCS is likely "rcs.exe" on Windows too, so we may need to massage that as well (if it matters to QProcess).<br><br>As for binary files RCS handles them without issue. It was important to the developers to make binary support as transparent as possible. Some binaries may generate larger diffs after awhile, however so do 10 numbered backups. ;)
<br><br>BTW - If it is worth it to anyone, I can add a class for returning a list of the revisions and and opening a revision by rev number. I didn't see anything else for retrieving backups in ksavefile.cpp so I left those out for now.
<br><br>Cheers!<br><br>Greg<br>-<br><br><div><span class="gmail_quote">On 2/1/06, <b class="gmail_sendername">Allen Winter</b> <<a href="mailto:winter@kde.org">winter@kde.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>So we have an rcsBackupFile() method now in the KSaveFile class that uses RCS<br>to implement backups.  This is in addition to the simple (1 backup with an extension)<br>and numbered (N backups) implementations.
<br><br>I'm not sure how well RCS handles binary files, but that's not the point of this message.<br><br>rcsBackupFile() uses QProcess to run the commands 'rcs', 'co', and 'ci'.  Greg didn't provide<br>a fullpath, and I think this is a security problem.  And what if the first 'rcs' in your $PATH doesn't
<br>happen to be the rcs you really want.   Should we provide a fullpath?  If so, are the RCS commands<br>always in /usr/bin?  Probably not guaranteed.<br><br>I like the idea to QProcess a command like 'PATH=/usr/bin:/usr/local/bin rcs' instead of just 'rcs'.
<br>What is a good $PATH for this idea?<br><br>I hate the idea:<br>#if linux<br>#define RCS_PATH "/usr/bin"<br>#elif windows<br>#define RCS_PATH 'c:/whatever/bin"<br>#etc<br>and then using QProcess on RCS_PATH + "/rcs"
<br><br>Other ideas?  We looked for an RCS API library and didn't find any.<br><br>-Allen<br>--<br>Let's Keep the Political Talk Out of KDE PLEASE<br></blockquote></div><br>