summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/entries.c
AgeCommit message (Collapse)Author
2006-05-27commit the new opencvs code, i have been hacking onJoris Vink
this for the past 2 weeks now and it should go in at the start of the hackathon so others can help out. this code is a lot safer, smarter, faster and best of all it is actually doing what it is suppose to do! basic checkout, update, status, diff and commit are working in local mode only. there is no support for any remote setups now.
2006-04-14remove a metric buttload of excessive ()Theo de Raadt
no binary change; ok ray
2006-04-05Use variable names for sizeof, remove casts in front of xmalloc,Ray Lai
use xcalloc and xstrdup where appropriate, and other stuff. OK joris@
2006-01-02#include's cleanup; ok joris@ niallo@.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-03- teach opencvs about Entries.Log and what to do with itJoris Vink
it it exists in the CVS admin dir. - when writing the Entries file write it to Entries.Backup first and then rename it to Entries when the writing was successfull.
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-10-22- don't check for admin files when running init;Joris Vink
- don't pass the Entry for newly added files to cvs_date_parse() - in rcs_rev_add don't bother looking for the previous rev if we are creating the RCS file. from PR 4575
2005-09-06more bits for the local remove command support; OK joris@.Xavier Santolaria
2005-09-06Make sure entries do not go away when we run through them in the file code.Joris Vink
Fixes corrupt Entry files. Problem found by Mike Pechkin, thanks.
2005-08-22add the correct entry for newly added files.Joris Vink
ok xsa@
2005-08-19style;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-12- style fixXavier Santolaria
- add trace message in cvs_ent_remove() ok jfb
2005-08-10fgets() expects the 2nd arg to be an int. OK jfb@ joris@.Xavier Santolaria
2005-07-25KNF;Xavier Santolaria
2005-07-24do not use `if (!var)' unless it's boolean, better use an == check;Xavier Santolaria
ok jfb@ joris@.
2005-07-21<sys/param.h> is already included in "cvs.h", no need to duplicate;Xavier Santolaria
2005-07-14be consistent when declaring cvs_ent structs; ok jfb@ joris@.Xavier Santolaria
2005-06-17correctly build a temporary copy of the client its repositoryJoris Vink
localy, so the server can execute the local commands on it and pipe the output to the client. with this diff in, our server is now working, please note that we currently don't have support for all commands yet, but you can expect this soon. ok xsa@
2005-06-07cvs_path_cat() already sets errno, no need to duplicate.Xavier Santolaria
2005-06-07only display the ``cannot open ./CVS/Entries'' error message whenXavier Santolaria
appropriate ... ok joris@.
2005-06-02remove unneeded error reporting when using cvs_path_cat(), theJoris Vink
function does it for us. OK jfb@
2005-05-31headers ordering (alphabetically) and cleanup, from mbalmer@ and myself;Xavier Santolaria
2005-05-27cvs_noexec check; ok jfbeersXavier Santolaria
2005-05-26don't keep a pointer to the file handle in CVSENTRIES, it is onlyJean-Francois Brousseau
used in cvs_ent_write(), and simplify path building a bit
2005-05-26- remove cvs_ent_getent(), it's not used anymoreJean-Francois Brousseau
- don't use strcmp() to compare one-character strings
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-19only allocate a revision number if the entry is for a regular file,Jean-Francois Brousseau
and make sure the ce_opts and ce_tag fields point to valid strings even for directories ok joris
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-04-22finish support for the '-' token in the Entry file, this allowsJoris Vink
us to mark files as removed, and lets the remove command work completely. tested and ok xsa@, jfb@
2005-04-15snprintf() return values checks; joris okXavier Santolaria
2005-02-22do not leak a file pointer in case of errorJean-Francois Brousseau
from Joris Vink
2005-02-01- accept a minus sign in front of the file's revision number toJean-Francois Brousseau
indicate that the file has been removed - set the timestamp as invalid if we get the "dummy timestamp" string in the 4th field
2005-01-14stupid me, no need to reinit the queueJean-Francois Brousseau
pointed by henning@
2005-01-14when removing the last entry from the tail queue, reinitialize theJean-Francois Brousseau
queue for sanity, and make sure that the current pointer is set to the next item if it points to the item being removed. fixes a crash reported by brad@, tested by joris and brad@
2004-12-14When loading directory entries, create file structures for files whichJean-Francois Brousseau
have been lost but have a valid entry.
2004-12-07less whitespace, more pretty. ok jfbTed Unangst
2004-12-06tighten vertical spacing for else; jfb okTheo de Raadt
2004-11-09We don't need to keep a copy of each Entries line, it isn't usedkrapht
anywhere and it consumes memory uselessly.
2004-08-31use the correct Entries path to store in cef_path;Joris Vink
ok jfb
2004-08-27Instead of keeping an open pointer to the Entries file when opening withJean-Francois Brousseau
write access, close it and reopen it only on demand, since large trees can contain enough Entries files to generate a 'Too many open files'. Problem spotted by Todd Fries.
2004-08-13* add an entry for directories when we create themJean-Francois Brousseau
* when writing a directory entry, skip the revision and timestamp
2004-08-13When the mtime is (time_t)-1, print the dummy timestamp string insteadJean-Francois Brousseau
of a bogus date
2004-08-13Ditch the 'ce_timestamp' field in favor of 'ce_mtime', which keepsJean-Francois Brousseau
the timestamp in time_t instead of a string
2004-08-12When creating a new Entries file, make sure we put one 'D' instead ofJean-Francois Brousseau
leaving the file empty
2004-08-06Fix usage of cvs_splitpath()Jean-Francois Brousseau
2004-08-04Simplify entry parsingJean-Francois Brousseau
2004-08-03Implement cvs_ent_remove()Jean-Francois Brousseau
2004-07-30* remove header cruft that belongs in file.hJean-Francois Brousseau
* be more intelligent with the file open mode. It seems rewind() doesn't work too well with a file opened in append mode