summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
AgeCommit message (Collapse)Author
2005-06-01remove debug codeJoris Vink
2005-06-01don't trust cvs_file_getpath() to get the correct path when creatingJoris Vink
the Repository file for subdirs, if we are not in the root directory of the repository. instead, save the parent's Repository path and reuse it when needed, this way CVS/Repository files aren't messed up with completely wrong pathnames when running "cvs update -d" in src/sys/ for example. ok xsa@
2005-06-01when creating a new directory, steal the parent its cvsroot structure ifJoris Vink
we cannot find one with cvsroot_get(). fixes several segfaults. tested & ok xsa@
2005-05-31headers ordering (alphabetically) and cleanup, from mbalmer@ and myself;Xavier Santolaria
2005-05-31remove LP_ERROR log priority level and rather use LP_ERR as they are bothXavier Santolaria
the same... ok jfb joris
2005-05-28make sure we check the Entry file when we need to.Joris Vink
ok jfb@
2005-05-25assume that a file is modified if its timestamp is lowerJean-Francois Brousseau
than the value found in Entries. This can't really hurt, as the server will simply ignore it if it's not really modified
2005-05-24don't fail on mkdir(2) when errno is EEXIST in cvs_file_create().Joris Vink
2005-05-24- simplify cvs_mkadmin().Joris Vink
- create the correct base paths in checkout. - remove the CVS_CMD_SENDARGS2 flag for checkout, it doesn't need it. okay jfb@
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-22unused variableJoris Vink
2005-05-20plug a memleakJoris Vink
2005-05-20allow a cvs command to be executed from outside a repository,Joris Vink
ie: "cvs -d /cvs update src". problem spotted & ok xsa@, jfb@
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-20don't attempt to copy the file's tag from the entry if we're dealingJean-Francois Brousseau
with a directory, otherwise we're squashing the file list as part of the union ok joris
2005-05-12set cvsent to NULL if entfile is NULL, fixes a crashJoris Vink
in cvs_file_lget().
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-05-01if CF_MKADMIN flag is specified the administrative files willJoris Vink
be created (if missing) in cvs_load_dirinfo().
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-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-19update cf_type to the correct type if we cannot stat(2) theJoris Vink
requested file or directory in cvs_file_lget(). should fix those "attempt to send Entry for non-regular file" errors. reported by brad@
2005-04-18only copy ce_tag is it is not NULL, fixes a segfault onJoris Vink
startup for the update command.
2005-04-18free cf_tag for regular files in cvs_file_free();Joris Vink
ok jfb@
2005-04-18more debugging leftoversJoris Vink
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-16more snprintf return value check; joris okXavier Santolaria
2005-04-13file callbacks won't return -1 anymore, but a CVS_EX_* errorJoris Vink
ok jfb@
2005-03-29cvs_file_attach() can fail, make sure we can handle itJoris Vink
when it does.
2005-03-26fix a variety of things i found at coverity. ok joris@Ted Unangst
2005-03-24ditch the filename hash table and use the new strtab code insteadJean-Francois Brousseau
ok joris@
2005-03-05fix file loading when recursion is disabled. this should fix theJean-Francois Brousseau
weird behaviour encountered when using the -l option to most commands ok joris@
2005-03-05make sure that errors from cvs_file_lget() cascade down instead ofJean-Francois Brousseau
ignoring them ok joris@
2005-03-02add a flag to identify the base directory in file hierarchies.Joris Vink
ok jfb@
2005-02-25- switch to rcsnum_parse() where appropriateJean-Francois Brousseau
- make rcsnum_parse() fail if it encounters an invalid character
2005-01-24when loading a file's information, remove its entry from the parentJean-Francois Brousseau
directory's entries handle even if the file doesn't exist on disk
2005-01-12use basename(3) instead of mangling the path to figure out theJean-Francois Brousseau
filename ourselves. Removes a bunch of now useless code. spotted by Joris Vink, diff by me
2005-01-11Close the Entries file we just created upon directory creation. ThisJean-Francois Brousseau
fixes the problem where a checkout would only add entries for directories. from Joris Vink
2005-01-06add *.core as part of the standard ignore patternsJean-Francois Brousseau
2005-01-06* always assign a cvsroot to directories, even if they are unknownJean-Francois Brousseau
to cvs * only avoid recursion on unknown directories if the CF_KNOWN flag was specified
2005-01-03when releasing a file structure, free the reference to its name soJean-Francois Brousseau
we don't leak memory spotted by Joris Vink, more complete diff from me
2004-12-28check the return values of rcsnum_alloc() and rcsnum_aton() onJean-Francois Brousseau
startup diff from Joris Vink, with minor changes
2004-12-28add more standard patterns to ignore; jfb okXavier Santolaria
2004-12-14When loading directory entries, create file structures for files whichJean-Francois Brousseau
have been lost but have a valid entry.
2004-12-13get rid of void* arithmetic to nuke another gcc warningJean-Francois Brousseau
2004-12-08check the return value of a strdup() call and return an error onJean-Francois Brousseau
failure from Joris Vink
2004-12-08avoid complaining twice when we fail to load a file, and fix a gccJean-Francois Brousseau
warning
2004-12-07when loading directory info, only close the handle to the Entries fileJean-Francois Brousseau
if it is not NULL. fixes a crash when running commands that have no administrative files to open yet (i.e. import) noticed by and discussed with Joris Vink
2004-12-07less whitespace, more pretty. ok jfbTed Unangst
2004-12-06tighten vertical spacing for else; jfb okTheo de Raadt
2004-12-06when loading the file information from the Entries file, open it inJean-Francois Brousseau
read-only mode. fixes a problem with running non-modifying commands in directories with restrictive permissions. Reported and patch tested by Peter Hessler