summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
AgeCommit message (Collapse)Author
2006-07-07first part of opencvs remote, fairly useable on existing treesJoris Vink
although i advise against using it on real development trees for now. only a few commands work right so far: - commit - diff - status - log - update (partially working) if you feel like testing remote and run into bugs feel free to contact me, and please include a full trace (-t).
2006-06-19kill local and remote callback and just have one called fileproc.Joris Vink
we let the commands pass the correct function. all in preparation for remote.
2006-06-14simplify cvs_hack_time() and the way it is called;Joris Vink
2006-06-14add cvs_buf_load_fd() which does the same as cvs_buf_load()Joris Vink
except it takes a decriptor as argument instead of a path. modified cvs_buf_load() to open the descriptor then pass it to cvs_buf_load_fd(). change all the calls to cvs_buf_load() that have a descriptor open for the path to cvs_buf_load_fd() to prevent races.
2006-06-03add support for update -A and update -r<rev>.Joris Vink
hacking on the plane from toronto to barbados. i will probably hack some more since im stuck in barbados for 12 lovely hours over night cause the carribean airlines dont understand the meaning over 'more than one flight a day'.
2006-06-02various spelling fixesDavid Krause
2006-06-01major rewrite of some rcs parsing stuff:Joris Vink
- rework rcs_getrev() to correctly support branches - rework rcs_translate_tag() to correctly translate given symbols or branches into their matching revisions - rework rcs_rev_add() to correctly update its 'next' pointers and insert the new revision in the correct place on the list. - rework rcs_head_get() to return the latest revision on the default branch if it has been set or the normal HEAD revision otherwise. - no longer access the rf_head member of the RCSFILE struct manually, use the rcs_head_get() function which correctly returns the HEAD revision, there might be a default branch that has to be used. - for now, when commiting a new revision reset the default branch.
2006-05-31allow commit to ressurect added files that exist in Attic/Joris Vink
2006-05-30only look into the Attic for certain commandsJoris Vink
2006-05-30fill in the correct revision number we will want in file_rcsrevJoris Vink
for each cvs_file struct, this will help us with sticky tags, commiting to branches and importing into existing repositories.
2006-05-30look inside the Attic if a specified RCS file cannot be foundJoris Vink
in the normal repository, and a way to identify an RCS file in the Attic in the RCSFILE struct. will come in handy later on.
2006-05-30hello import, only works for non-existing repositories right now,Joris Vink
but work is in progress for importing stuff into existing repositories.
2006-05-29i was wrong adding ".*" to the default ignore patterns,Joris Vink
so remove it from there again.
2006-05-29if the timestamp of the file has changed andJoris Vink
no longer matches the timestamp in the CVS/Entries file, be sure to compare the file contents to the revision contents to be positive the file actually changed. otherwise we would see a file as modified if somebody would for example open it in vi and simply :wq it.
2006-05-28Fix engrish, okay joris@Pedro Martelletto
2006-05-28add basic 'cvs log' support.Joris Vink
2006-05-28several fixes to the file api:Joris Vink
- default to CVS_FILE when something is totally unknown - cvs_get_repository_path() now returns the full repository path for the given argument. - cvs_get_repository_name() returns the contents of CVS/Repository to the caller. - allow command callbacks to specify if our recursion code needs to skip the directory or not. - when checking for a admin directory, make sure it is in fact a directory. if it is not we dont want to recurse inside.
2006-05-28add rf_dead field to RCSFILE which can tell usJoris Vink
if an RCSFILE is dead, will come in usefull later in commands.
2006-05-28if we run into a file that was suppose to be a directoryJoris Vink
or a directory that is suppose to be a file, abort right away because something bad probably happened.
2006-05-28allow commands to shut up the output from cvs_file_classifyJoris Vink
if the commands want to output certain stuff themselfs
2006-05-27more standard ignore patternJoris Vink
2006-05-27remove debug outputJoris Vink
2006-05-27allow commands to respect the -l flag, if the -l flag isJoris Vink
specified certain commands will not recurse into directories. at the same time introduce a method of specifying wether or not a command should look in the repository for files.
2006-05-27use RCS_STATE_DEAD instead of plain old 'dead' when checkingJoris Vink
the RCS file its state.
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-04-02spacing;Joris Vink
2006-01-02#include's cleanup; ok joris@ niallo@.Xavier Santolaria
2005-12-12only xfree() cf->cf_dir when it's not NULL;Joris Vink
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-04more code cleanup, remove useless flags and parts of codeJoris Vink
that never got used in the first place;
2005-12-03fix date handling in opencvs, this was broken since the very start.Joris Vink
now, when you checkout a tree with gnu cvs, opencvs no longer sees all the files as modified, and visa versa. this actually makes gnu cvs and opencvs dance together in working copies.
2005-12-03remove unused and useless functions, they just get in the way;Joris Vink
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-12- remove strtab stuff. serves no useful purpose.Niall O'Higgins
diff is from joris@, committing on his behalf because his net connection is very dodgy right now.
2005-10-27if cvs_file_loadinfo fails, return failure to the caller insteadJoris Vink
of acting like everything went fine. this fixes eternal loops in the client which waits for data from the server while the server waits for data from the client. problem found and fixed by Nuno Morgadinho, thanks!
2005-10-16less 'pirates of the carribean' like error message;Joris Vink
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-09-14knfJoris Vink
2005-09-13fix conditions when the base directory should be passed to the commandJoris Vink
callback. fixes local commands with directories as arguments (like 'add'). problem found and OK xsa@
2005-09-11only remove and free a cvsroot struct if it has been added inJoris Vink
cvsroot_parse(). fixes segfaults opencvs has been receiving when cvsroot_parse() fails. "go ahead" xsa@
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-19do not close the entries file until all files depending on it haveJoris Vink
been passed to the callback. ok xsa@
2005-08-17keep a pointer to the CVSENTRIES in the CVSFILE structure.Joris Vink
ok xsa@
2005-08-17trailing whitespaces ...Xavier Santolaria
2005-08-14missing casts; ok jorisXavier Santolaria