summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Accommodate POSIX basename(3) that takes a non-const parameter andnaddy2020-10-191-4/+10
| | | | | | may modify the string buffer. ok florian@ millert@
* If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.joris2017-06-011-2/+4
| | | | | Otherwise we end up calling cvs_repository_unlock() with garbage from the stack if we're dealing with a remote cvsroot.
* Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.joris2017-06-011-9/+6
| | | | Instead use cvsroot_is_local() and cvsroot_is_remote().
* cvs_file_classify() was making the mistake of only taking over a stickyjoris2017-05-291-2/+2
| | | | | | | tag from Entries for a given file if the sticky tag is present. while changing this we can simplify some logic in update.c on how it decides what tag to use for file classification.
* Let opencvs show ignored files on import, not showing them is just confusing.joris2017-05-281-4/+6
| | | | ok stsp@
* Quiet compiler warnings. OK tomc@ tb@millert2016-10-151-8/+6
|
* rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.fcambus2016-10-131-4/+2
| | | | OK millert@
* Remove xfree(), like already done for RCS. From Michael W Bombardieri,nicm2015-11-051-17/+15
| | | | ok mmcc
* Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopederaadt2015-08-201-3/+3
| | | | ok krw millert
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-1/+2
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-21/+21
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Make it compile again. And there is a time_t fix as a bonus!zhuk2013-12-131-3/+3
| | | | Input and okay jca@.
* Change basep parameter of getdirentries() to be off_t *, not long *millert2010-10-281-2/+2
| | | | | | | | so it works correctly with large offsets (and matches other systems). This requires adding a new getdirentries syscall, with the old one renamed to ogetdirentries. All in-tree consumers of getdirentries() have been updated. Bump libc and libpthread major numbers. OK and with deraadt@
* Have cvs_file_walkdir() ignore CVS/ directories when walking a repository tree.joshe2010-09-271-2/+3
| | | | | | | This fixes r* commands such as rlog against a repository which has somehow ended up containing CVS/Entries.Static files. ok nicm@ guenther@
* Reduce variable/function name and whitespace differences betweenray2010-07-231-5/+5
| | | | | | cvs/rcs. OK xsa zinovik
* Do not put the file into conflict if it is no longer modified (user hasnicm2010-07-131-4/+1
| | | | | | edited it back to repository state). ok zinovik
* when i fixed to attic handling i forgot one special casejoris2009-03-281-1/+8
| | | | | | | that we'd hit in normal checkouts/updates for duplicate file and dirs. found and diff tested by krw@
* fix the way Attic is handled in our recursion code, so wejoris2009-03-261-30/+51
| | | | | | | | | | | | | 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@
* switch our file and directory lists to RB trees (see tree(3)),joris2009-03-251-18/+28
| | | | so we can benefit from faster lookup times while recursing.
* have CVS_OP_TAG and CVS_OP_RTAG use RCS_WRITE flagjoris2009-03-241-2/+3
| | | | | | | | when calling rcs_open(), so it gets automaticly synced at the end of operations for that file instead of explicitly calling rcs_write() when you're in RCS_READ mode only. while here, make sure we do not try to free an uninitialized list.
* properly register Questionable files using CVS/Entries server-sidejoris2009-03-191-1/+6
| | | | in order for them to show up as "? foobar" when opencvs is in server mode.
* fix grammarjoris2009-02-211-2/+2
| | | | from <dawedawe@gmx.de>
* use FILE_ON_DISK flags when we need to verify if a filejoris2009-02-211-11/+17
| | | | | exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
* use file_flags for 2 more reasons:joris2009-02-211-2/+6
| | | | | | | | | - 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.
* alter cvs_file_get() so it takes flags instead of one setjoris2009-02-211-10/+10
| | | | | | | 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.
* Support the addition of new files in branches.tobias2008-06-151-3/+4
| | | | ok joris
* Added support for sticky date set in CVS/Tag and CVS/Entries per directory.tobias2008-06-141-2/+3
| | | | ok joris
* don't always re-open the same CVS/Entries file, instead keep thejoris2008-06-141-4/+1
| | | | | | | | | | | | last opened CVS/Entries around to operate on and close it whenever we switch directory. gives us a small performance boost, obviously. while doing this, switch the way we write revisions to disk by using fwrite(3) so stuff can get written to disk in chunks instead of writing everything line by line, another win. with help from otto@ ok tobias@
* pass the complete path to cvs_file_get_cf() instead of reconstructingjoris2008-06-131-7/+6
| | | | it again in that function.
* properly deal with CVS_USE_WDIR.joris2008-06-121-2/+3
| | | | ok tobias@
* fix logicjoris2008-06-121-2/+2
|
* completely kill the need for TMP_DIR when running checkout,joris2008-06-121-2/+3
| | | | | | | | | | | | | | which gives us better performance among other things. this is however disabled in a few cases: 1) whenever you run checkout over an existing tree (which acts as update) 2) whenever you specify -d or a module alias we're planning on enabling this behaviour for case 2 in the future. anoncvs sysadmins now love us even more. ok tobias@
* Properly handle merged files and conflicts which may arrise while merge.tobias2008-06-091-3/+8
| | | | | | | Instead of ignoring all files which contain possible conflict markers, only watch out for files which have actually been merged. With input by and ok joris.
* Stop fooling ourselfs by freeing cvs_directory_tag at the wrong position:tobias2008-06-091-7/+7
| | | | | | | cvs_directory_tag is reinitalized every time we enter a new directory, so make it clear by freeing before going into a new directory. discussed with and ok joris
* Removed unreachable code.tobias2008-06-081-3/+1
| | | | | | Spotted by Igor Zinovik. ok joris
* Avoid memory leaks in directory tag handling by always allocating andtobias2008-06-081-4/+11
| | | | | | always freeing dirtag. ok joris
* There is no need to convert RCSNUMs to char just to see if they differ.tobias2008-06-081-12/+6
| | | | | | | We have rcsnum_differ for that. Also remove an unused var assignment if no CVS/Entries entry exists. ok joris
* Spacing; Stefan Sperling.xsa2008-05-221-2/+2
|
* use RCS_PARSE_FULLY for CVS_OP_ADMIN as well.joris2008-03-131-1/+2
|
* only compare file types if the file/directory exists both on diskjoris2008-03-091-5/+4
| | | | | | | and in the CVS/Entries file, otherwise ignore it so we correctly remove it from CVS/Entries. spotted by krw@
* proper repository locking:joris2008-03-091-4/+19
| | | | | | | - all read operations now look for a lock, and wait if present but never try to lock the tree themselfs anymore. - all write operations lock the tree where needed. - commit locks all relevant directories before even attempting to start.
* do not empty the list in cvs_file_walklist() this is the callerjoris2008-03-091-5/+1
| | | | | his responsibility, allows us to reuse the same file list for multiple callbacks.
* cf->user_supplied cannot be used in cvs_file_classify for all commandstobias2008-03-091-2/+2
| | | | | (like import, add, commit), so revert this change until a universal solution is found.
* Don't force ourself to support CVS_USE_WDIR commands (release, update, ...)tobias2008-03-091-2/+2
| | | | | | only if we are in top directory of a repository. ok joris
* pass user_supplied to struct cvs_file so it can be usedjoris2008-03-091-3/+5
| | | | in the callbacks to verify if this file was specified on the command line.
* rename check_dir_tag to user_supplied to reflect what the flagjoris2008-03-091-4/+4
| | | | actually means and is used for.
* While allocation memory, make sure that file sizes are smaller than SIZE_MAX.tobias2008-03-091-3/+6
| | | | ok joris
* add checkout/update -j support.joris2008-03-081-2/+3
| | | | still has some rough edges.
* spacingderaadt2008-03-011-4/+4
|
* make sure we compare our current file contents against the correctjoris2008-03-011-3/+3
| | | | | | revision specified in CVS/Entries if the timestamps mismatch, so that we do not end up merging a file that was not even modified whenever it needs a normal patch.