summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.h
AgeCommit message (Collapse)Author
2009-03-26fix the way Attic is handled in our recursion code, so weJoris Vink
do not skip files or run over them twice. also fixes -l and -r for checkout/update when a file in Attic exists with that tag that in HEAD is a directory in the normal repository like gnu/usr.bin/gcc/INSTALL. as a bonus, we do not run fstat() twice per file or dir anymore... spotted by deraadt@
2009-03-25switch our file and directory lists to RB trees (see tree(3)),Joris Vink
so we can benefit from faster lookup times while recursing.
2009-02-21use file_flags for 2 more reasons:Joris Vink
- mark a file as being inside the Attic/ - mark a file as existing in the working copy (both in local and remote mode) this way we no longer will need to check if cf->fd == -1 and think about wether or not we are in local or remote mode.
2009-02-21alter cvs_file_get() so it takes flags instead of one setJoris Vink
value for user_supplied. allow us to carry any important file flags over to cvs_file's later on. makes it easier for what i have coming.
2008-06-13pass the complete path to cvs_file_get_cf() instead of reconstructingJoris Vink
it again in that function.
2008-03-09pass user_supplied to struct cvs_file so it can be usedJoris Vink
in the callbacks to verify if this file was specified on the command line.
2008-03-09rename check_dir_tag to user_supplied to reflect what the flagJoris Vink
actually means and is used for.
2007-09-23pass FILE_HAS_FLAG towards the update code so it can identifyJoris Vink
if a given tag is present in the RCSfile or not.
2007-09-22better branching/sticky tag support, no branch commits yet though.Joris Vink
2007-06-01add support for local and remote branch checkout. for example,Niall O'Higgins
cvs co -rOPENBSD_3_0 works now. along the way, simplify and rationalise code and fix a few nits. ok joris@ xsa@ ray@
2007-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
2007-02-13zap unused CVS_ISDIR() and CVS_ISFILE() macros. OK joris@.Xavier Santolaria
2007-02-09remove the cvs_file_classify() `loud' argument, it was usedJoris Vink
in the old school days and serves no purpose what so ever now. otto@ mentioned this to me a while ago
2007-01-10add a cvs_file_copy routine and use it for the edit command toXavier Santolaria
copy the file in the current working directory to CVS/Base/ ok ray@ joris@.
2007-01-06add cvs_base_handle() routine to handle the CVS/Baserev* files.Xavier Santolaria
first bits for the edit command for now. definitly still more work to do for optimization...
2007-01-05- introduce file comparison routine, cvs_file_cmp().Xavier Santolaria
- compare the <file> in working dir and the one in CVS/Base/<file> for the unedit command. hints otto@, input and ok ray@ niallo@.
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-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-28allow commands to shut up the output from cvs_file_classifyJoris Vink
if the commands want to output certain stuff themselfs
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-01-02more includes cleanup;Xavier Santolaria
2005-12-04more code cleanup, remove useless flags and parts of codeJoris Vink
that never got used in the first place;
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-08-17keep a pointer to the CVSENTRIES in the CVSFILE structure.Joris Vink
ok xsa@
2005-07-31nuke a totally unused flag for cf_flagsJoris Vink
2005-07-25KNF; mostly spaces vs. tabs; ok joris@ jfb@.Xavier Santolaria
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-07add a field to CVSFILE which holds the timestamp from the Entries file.Joris Vink
usefull for some commands. ok xsa@
2005-07-06add explicit comments for file status;Xavier Santolaria
2005-06-14finish pruning support, this has been sittingJoris Vink
in my tree since c2k5 ok xsa@
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-20execute the command callback at the same time we are buildingJoris Vink
the in-memory filelist. cuts down on execution time for larger trees. "put it in!" jfb@
2005-05-12introduce a new flag to the file api: CF_NOFILES, which allows usJoris Vink
to only load directories and skip regular files. tested and ok xsa@
2005-04-25first part of file API changes:Joris Vink
- fix our behaviour regarding directories or files in a different directory than we currently are as arguments to commands, this allows stuff like "cvs status sys/arch/i386/Makefile" to work. - when parsing a pathname only load the needed nodes of the path instead of loading *everything* in memory. the next step in this is to merge the collection and callback execution together. 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-03-24ditch the filename hash table and use the new strtab code insteadJean-Francois Brousseau
ok joris@
2005-03-02add a flag to identify the base directory in file hierarchies.Joris Vink
ok jfb@
2004-12-15modify the CVS_DIR_ROOT() macro to grab the parent's root if the fileJean-Francois Brousseau
is a directory and has no root set
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-02Add cvs_file_copy() to create a copy of a file structure.Jean-Francois Brousseau
This will be used in the commit code.
2004-11-26Rewrite the internals of the file management code so that we do not keepJean-Francois Brousseau
a full path to each file we load, and cache file names so we can have multiple references to a single name. This saves a lot of memory on large trees such as /usr/src, especially on 'Makefile', 'README' and such.
2004-08-06* add a flag CF_NOSYMS to avoid loading information about symbolic linksJean-Francois Brousseau
and fix 2 calls to cvs_splitpath() * unbreak cvs_file_find()
2004-08-06Add fields to keep track of the file's mode and last modification timeJean-Francois Brousseau
2004-08-06the CF_STAT flag is useless now, all we have to do is extract the requiredJean-Francois Brousseau
information and keep it in the file structure
2004-08-02Remove cruft and unbreak compilationJean-Francois Brousseau
2004-08-02Allocate a dynamic buffer for sorting. This way, we don't bork anymoreJean-Francois Brousseau
on directories with huge sets of files, and fix a bug while we're at it. When sorting failed, the files that had been removed from the list didn't get pushed back in it.