summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
AgeCommit message (Collapse)Author
2009-03-28when i fixed to attic handling i forgot one special caseJoris Vink
that we'd hit in normal checkouts/updates for duplicate file and dirs. found and diff tested by krw@
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-03-24have CVS_OP_TAG and CVS_OP_RTAG use RCS_WRITE flagJoris Vink
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.
2009-03-19properly register Questionable files using CVS/Entries server-sideJoris Vink
in order for them to show up as "? foobar" when opencvs is in server mode.
2009-02-21fix grammarJoris Vink
from <dawedawe@gmx.de>
2009-02-21use FILE_ON_DISK flags when we need to verify if a fileJoris Vink
exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
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-15Support the addition of new files in branches.Tobias Stoeckmann
ok joris
2008-06-14Added support for sticky date set in CVS/Tag and CVS/Entries per directory.Tobias Stoeckmann
ok joris
2008-06-14don't always re-open the same CVS/Entries file, instead keep theJoris Vink
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@
2008-06-13pass the complete path to cvs_file_get_cf() instead of reconstructingJoris Vink
it again in that function.
2008-06-12properly deal with CVS_USE_WDIR.Joris Vink
ok tobias@
2008-06-12fix logicJoris Vink
2008-06-12completely kill the need for TMP_DIR when running checkout,Joris Vink
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@
2008-06-09Properly handle merged files and conflicts which may arrise while merge.Tobias Stoeckmann
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.
2008-06-09Stop fooling ourselfs by freeing cvs_directory_tag at the wrong position:Tobias Stoeckmann
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
2008-06-08Removed unreachable code.Tobias Stoeckmann
Spotted by Igor Zinovik. ok joris
2008-06-08Avoid memory leaks in directory tag handling by always allocating andTobias Stoeckmann
always freeing dirtag. ok joris
2008-06-08There is no need to convert RCSNUMs to char just to see if they differ.Tobias Stoeckmann
We have rcsnum_differ for that. Also remove an unused var assignment if no CVS/Entries entry exists. ok joris
2008-05-22Spacing; Stefan Sperling.Xavier Santolaria
2008-03-13use RCS_PARSE_FULLY for CVS_OP_ADMIN as well.Joris Vink
2008-03-09only compare file types if the file/directory exists both on diskJoris Vink
and in the CVS/Entries file, otherwise ignore it so we correctly remove it from CVS/Entries. spotted by krw@
2008-03-09proper repository locking:Joris Vink
- 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.
2008-03-09do not empty the list in cvs_file_walklist() this is the callerJoris Vink
his responsibility, allows us to reuse the same file list for multiple callbacks.
2008-03-09cf->user_supplied cannot be used in cvs_file_classify for all commandsTobias Stoeckmann
(like import, add, commit), so revert this change until a universal solution is found.
2008-03-09Don't force ourself to support CVS_USE_WDIR commands (release, update, ...)Tobias Stoeckmann
only if we are in top directory of a repository. ok joris
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.
2008-03-09While allocation memory, make sure that file sizes are smaller than SIZE_MAX.Tobias Stoeckmann
ok joris
2008-03-08add checkout/update -j support.Joris Vink
still has some rough edges.
2008-03-01spacingTheo de Raadt
2008-03-01make sure we compare our current file contents against the correctJoris Vink
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.
2008-02-20With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore.Tobias Stoeckmann
OK joris@
2008-02-20styleJoris Vink
2008-02-11Cleanup buf implementation:Tobias Stoeckmann
* Don't check for NULL on buffer creation, because it calls fatal() when something's wrong. * All buffers are supposed to expand if there is no space left in them, so zap flags as well. * Remove code that is now dead. OK joris@ > Inspired by a diff from Igor Zinovik about unchecked return value.
2008-02-10introduce cvs_validate_directory(), which is used to checkJoris Vink
directory path to make sure they do not fall outside the CVSROOT or the working copy directory in a remote setup
2008-02-10properly initialize cvs_specified_date so we dont end up withJoris Vink
random stuff going on
2008-02-09Get in proper support for checkout/update -A when it comes to keywordTobias Stoeckmann
expansion options. OK joris@
2008-02-09Get in initial support for checkout -D. Works fine with -r support rightTobias Stoeckmann
now. OK joris@
2008-02-08when checking if a file is really dead do not use cvs_specified_tag only,Joris Vink
instead use the local variable 'tag' which is filled in by our code to match the correct tag (specified on the command line, or in Entries); this way, files do not dissapear when they're suppose to be there if you are using -rSOMETHING
2008-02-08do not override the specified tag (-r on the command line) with a directoryJoris Vink
tag (if present) since this breaks certain things;
2008-02-04Stripped off 'nb', which was (or was supposed to be) used to distinguishTobias Stoeckmann
between a named branch and a revision number supplied by -r. This can be done easier in cvs_write_tagfile directly. OK joris@
2008-02-03more CVSROOT/module stuff:Joris Vink
- allow more then 1 module to be specified per definition - respect the "!" sign which means: "hey ignore this dir when checking out" - non alias definitions can now contain files ok tobias@
2008-02-03(f)utimes takes sys/time.hTobias Stoeckmann
2008-01-31If CVS/Entries.Static exists, don't look for more files in repository.Tobias Stoeckmann
OK joris@
2008-01-31Replaced the unused cvs_command variable cmd_req with cmd_flags, which statesTobias Stoeckmann
if the current command is supposed to use a working directory or if it is a repository-only command (as of now checkout -p, rtag, rlog). Makes the code simpler, easier to read and automagically fixes some issues we encountered with these commands (for example if a working directory exists, or "." operations are performed). OK joris@, niallo@
2008-01-21Fixed export to be fully functional and compliant to GNU cvs in local andTobias Stoeckmann
remote setups. OK xsa@
2008-01-10various fixes for remote commands (right now we support rlog and rtag)Tobias Stoeckmann