summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/resp.c
AgeCommit message (Collapse)Author
2005-12-20cvs_buf_putc() and cvs_buf_write_*() functions cannot fail anymore;Xavier Santolaria
2005-12-10switch to xmalloc stuff, me and xsa@ agreed on this a longJoris Vink
time ago, but we were being held back by jfb. too bad for him. next step is to use fatal() through out the code for unrecoverable errors instead of trying to be all nice and fluffy and reach main() again. ok niallo@ and xsa@
2005-12-03add very basic support for the following stuff:Joris Vink
- checkout in local mode (example: /cvs) - update in local and server mode (example: /cvs and user@host:/cvs) - import in local and server mode (example: /cvs and user@host:/cvs) what remains to be done: - not all options are supported yet, and update cannot pick up newly added files yet. these things are pending and will be commited real soon. - checkout only works locally right now. - fix rcs parsing code so that we don't fucking hog 100% cpu on really BIG BIG BIG ass trees. mainly tested by pedro@ and myself, thanks a lot pedro! "go for it" niallo@
2005-11-28consistency in error messages;Xavier Santolaria
2005-10-22diff3 support, needed for merging files together;Joris Vink
"go for it" niallo@
2005-10-07knf and spacing, ok joris@Reyk Floeter
2005-09-15strip trailing slashes from any arguments passed to opencvs.Joris Vink
ok xsa@
2005-09-15check in cvs_mkadmin() wether we need to create or not theXavier Santolaria
CVS/Tag file. Sync the rest of the code accordingly; OK joris@.
2005-08-19missing cast;Xavier Santolaria
2005-08-17more use of CVS_ENT_MAXLINELEN;Xavier Santolaria
2005-08-16#define CVS_ENT_MAXLINELEN 1024Xavier Santolaria
.. as the maximum length of a line in an Entries file, and use it. problem spotted a while ago by mpech@. ok jfb joris
2005-08-14we do not want '.' to show up in the entries file, because itJoris Vink
causes opencvs to crash. reported by Mike Pechkin ok xsa@
2005-08-02oops, missing variable;Joris Vink
2005-08-02fix a few bugs which happened when there is no CVS/ directory or whenJoris Vink
entire directories were removed from the repository found by mpech@ ok xsa@
2005-07-26remove the (errno != ENOENT) check now that it is included in cvs_unlink();Xavier Santolaria
2005-07-25KNF;Xavier Santolaria
2005-07-24use cvs_unlink();Xavier Santolaria
2005-07-24do not use `if (!var)' unless it's boolean, better use an == check;Xavier Santolaria
ok jfb@ joris@.
2005-07-23rewrite of the file code. the previous one was justJoris Vink
a mess and not clean. this code is much cleaner, faster, and uses less memory overall. tested by xsa@, brad@, Michael Knudsen, and myself. okay xsa@
2005-07-22use the cf_name field of the CVSFILE struct instead of using the oldJoris Vink
CVS_FILE_NAME macro. This macro used to be nifty because of all the referencing for the names, but since we don't do that anymore and use cf_name directly... byebye CVS_FILE_NAME() okay xsa@
2005-07-14be consistent when declaring cvs_ent structs; ok jfb@ joris@.Xavier Santolaria
2005-07-10if the Entries file for the parent directory is already openJoris Vink
when receiving a Clear-sticky / Set-sticky response from the server, don't re-open it again and invalidate the open list, but instead use the already opened Entries file. solves our missing directory problem.
2005-07-05protect against cvs_getln() failure.Joris Vink
ok xsa@
2005-06-10instead of opening and closing the entry file all theJoris Vink
time, keep the entry file for the last received directory open until we switch directories. cuts CPU time in half and increases overall performance a bit. ok xsa@
2005-05-31headers ordering (alphabetically) and cleanup, from mbalmer@ and myself;Xavier Santolaria
2005-05-24- create the Entries.Static file with 0644 permissions instead of 0400.Joris Vink
- only add the directory entry to the Entry file when it's not already there.
2005-05-24remove debugging stuffJoris Vink
2005-05-24don't try to create directories with mkdir(2) in cvs_resp_sticky().Joris Vink
it will already be created with cvs_file_create(). fixes the Clear-sticky and Set-sticky responses.
2005-05-24Merge the cvs_cmd and cvs_cmd_info structures and add the necessaryJean-Francois Brousseau
fields to hook local versions of the commands. This needs to go in before it gets any bigger ok joris
2005-05-24create the target directory when we receive either of theJean-Francois Brousseau
{Clear,Set}-{static-directory,sticky} responses ok joris
2005-05-20cvs_noexec checks; jfb okXavier Santolaria
2005-05-19use the date parsing code from date.y and fix timestamps on newlyJean-Francois Brousseau
created files so they match the values found in the corresponding entries, otherwise all files appear as modified ok joris
2005-05-12fix segfault in cvs_resp_error()Joris Vink
2005-05-11in cvs_resp_removed(), don't abort the operation if we are tryingJoris Vink
to unlink(2) a file that has already been removed. ok xsa@
2005-05-03catch stupid gnu cvs behaviour, it sends an empty error messageJoris Vink
at the end of a diff command (even successfull ones) so we have to make sure not to show the empty line on screen. ok xsa@
2005-04-20shut up a useless warning for newly created filesJoris Vink
ok jfb@
2005-04-19correctly handle the "Removed" response, so that the correctJoris Vink
file and entry are removed. ok jfb@, xsa@
2005-04-18Modify the CVSFILE structure using a union to keep information aboutJean-Francois Brousseau
both files and directories. We can now keep the revision number for regular files, and don't need to fetch the appropriate entry in the command callbacks. This saves a huge amount of parsing on Entries files. ok joris@
2005-04-15braino; joris okXavier Santolaria
2005-04-15shudup useless warning; ok jfb@.Xavier Santolaria
2005-04-14set ret to 0 after using it to check snprintf() so thatJoris Vink
cvs_resp_handle() doesn't freak out and causes everything to go crazy and fail.
2005-04-13check return values of snprintf() for potential overflows or errorsJean-Francois Brousseau
ok xsa@, joris@
2005-04-11don't include sysexits.h now we don't use those error codesJoris Vink
anymore.
2005-03-29cvs_file_attach() can fail, make sure we can handle itJoris Vink
when it does.
2005-01-27since we close the handles to Entries files, we must reopen them to addJean-Francois Brousseau
the directories when receiving a Clear-sticky or Set-sticky response. spotted by Joris Vink
2005-01-13when warning about unimplemented handlers, do not attempt to printJean-Francois Brousseau
the errno message string
2005-01-06check the return value of a strdup() call and return an error onJean-Francois Brousseau
failure from Joris Vink
2004-12-13yet another mistake in the protocol docs...even if we send theJean-Francois Brousseau
appropriate Entry for a file which was lost locally, the server responds with a Created, so we must remove the previous entry before replacing it with the one we receive.
2004-12-13free the buffer used to receive a file in the Updated response handlerJean-Francois Brousseau
and saner handling of checksums spotted by and discussed with Joris Vink
2004-12-10fix the Copy-file response handler, it seems the CVS protocolJean-Francois Brousseau
documentation is not exactly up to date for that handler as well