summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
AgeCommit message (Collapse)Author
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
2008-01-10Make cvs_file_classify more readable.Tobias Stoeckmann
"Be especially careful with this one" joris@
2008-01-10xmalloc + memset -> xcallocTobias Stoeckmann
2008-01-10RCS files without head keyword mustn't segfault our implementation. OnlyTobias Stoeckmann
command that supports such files is "cvs status", therefore properly handle them in all other commands, too.
2007-11-09Fix for a rather unintuitive behaviour, this way it can be reproduced:Tobias Stoeckmann
cvs checkout src/sbin/swapon cvs checkout -rHEAD src/sbin/swapon If no date or revision has been supplied, swapon.8 won't be checked out, but if a revision (even if it is HEAD) or a date (-D) has been supplied, swapon.8 will be checked out due to modifications in Attic/ after it has been removed from tree.
2007-10-09Do not warn user about files that are "no longer in the repository"Tobias Stoeckmann
during cvs import. OK niallo@
2007-10-05strcspn() changeGilles Chehade
was okay'd by pyr@ and ok by millert@
2007-09-24add support to commit modified files to branches.Joris Vink
2007-09-23make sure when running update -r on existing files to overwriteJoris Vink
the sticky directory tag with it. since -r gets priority.
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-09-22we no longer create a 0 sized file in our /tmp/cvs-serv<pid> serverJoris Vink
directory when a client sends us info about a file that is up to date. instead, remember the file is up to date in our CVS/Entries. Saves us a lot of headaches on very big trees like src/
2007-09-17Imported atomicio interface.Tobias Stoeckmann
Requested by ray@, OK joris@
2007-09-09Added support for checkout -p with local repository.Tobias Stoeckmann
OK joris@
2007-09-07Do not fatal if getpwuid() fails, instead ignore user configuration files.Tobias Stoeckmann
OK joris@
2007-07-03Rework the way opencvs works in relation to files in the Attic/:Joris Vink
Previously, files in the 'Attic/' were linked into our filelist as being 'Attic/filename,v' this caused unneeded stress on certain functions like cvs_file_classify() who had to do pointer voodoo to split out the 'Attic/' part and do other very weird stuff to normalize the pathname of these files. Instead, we handle these files early in the start when we build the fileslist in cvs_repository_getdir(). When encountering the 'Attic/' directory, we recurse in it if required but instead of using the 'Attic/' directory component as our base directory we stick with the directory name where 'Attic/' resides in, resulting in the correct filename while maintaining the correct RCSpath for the file. This made the following things a lot easier: (and in most cases actually fixed the below points) - status with files in Attic/. - checking out HEAD repositories with files in Attic/. - checking out repositories with -rTAG. - updating with -rTAG. and as an added bonus the following now also works: - correctly creating CVS/Tag in both local and remote mode thus allowing update/status/and more to work correctly with the tagged tree. (thanks to the correct handling of -rTAG cases). - resetting tags with opencvs -A properly works too now. This is a major step forward into the usability of OpenCVS when it comes to maintaining multiple tagged trees, the next logical step would be to fix commiting to branches. enjoy you -stable cowards. tested by myself, xsa, niallo and ckuethe thanks guys!
2007-06-28Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK niallo@ ray@.
2007-06-26add support for cvs rlog.Niall O'Higgins
from Mickey. ok joris@ ray@
2007-06-04remove a fatal i committed by accident.Niall O'Higgins
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-21Simplify cvs_buf_differ(). Also cvs_buf_differ(), a comparisonRay Lai
function, should not do any resource freeing. OK joris@.
2007-02-19Fix const inconsistencies, void pointer artithmetic and a few otherOtto Moerbeek
things. now gcc -Wall and lint are more happy. ok joris@ xsa@