summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore.tobias2008-02-201-4/+1
| | | | OK joris@
* stylejoris2008-02-201-3/+2
|
* Cleanup buf implementation:tobias2008-02-111-4/+2
| | | | | | | | | | | | * 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.
* introduce cvs_validate_directory(), which is used to checkjoris2008-02-101-1/+5
| | | | | directory path to make sure they do not fall outside the CVSROOT or the working copy directory in a remote setup
* properly initialize cvs_specified_date so we dont end up withjoris2008-02-101-2/+2
| | | | random stuff going on
* Get in proper support for checkout/update -A when it comes to keywordtobias2008-02-091-3/+3
| | | | | | expansion options. OK joris@
* Get in initial support for checkout -D. Works fine with -r support righttobias2008-02-091-12/+16
| | | | | | now. OK joris@
* when checking if a file is really dead do not use cvs_specified_tag only,joris2008-02-081-2/+2
| | | | | | | | 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
* do not override the specified tag (-r on the command line) with a directoryjoris2008-02-081-2/+2
| | | | tag (if present) since this breaks certain things;
* Stripped off 'nb', which was (or was supposed to be) used to distinguishtobias2008-02-041-2/+2
| | | | | | | between a named branch and a revision number supplied by -r. This can be done easier in cvs_write_tagfile directly. OK joris@
* more CVSROOT/module stuff:joris2008-02-031-1/+11
| | | | | | | | - 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@
* (f)utimes takes sys/time.htobias2008-02-031-1/+2
|
* If CVS/Entries.Static exists, don't look for more files in repository.tobias2008-01-311-3/+7
| | | | OK joris@
* Replaced the unused cvs_command variable cmd_req with cmd_flags, which statestobias2008-01-311-10/+25
| | | | | | | | | | | 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@
* Fixed export to be fully functional and compliant to GNU cvs in local andtobias2008-01-211-4/+4
| | | | | | remote setups. OK xsa@
* various fixes for remote commands (right now we support rlog and rtag)tobias2008-01-101-4/+10
|
* Make cvs_file_classify more readable.tobias2008-01-101-7/+17
| | | | "Be especially careful with this one" joris@
* xmalloc + memset -> xcalloctobias2008-01-101-3/+2
|
* RCS files without head keyword mustn't segfault our implementation. Onlytobias2008-01-101-3/+5
| | | | | command that supports such files is "cvs status", therefore properly handle them in all other commands, too.
* Fix for a rather unintuitive behaviour, this way it can be reproduced:tobias2007-11-091-1/+5
| | | | | | | | | | 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.
* Do not warn user about files that are "no longer in the repository"tobias2007-10-091-2/+2
| | | | | | during cvs import. OK niallo@
* strcspn() changegilles2007-10-051-12/+6
| | | | was okay'd by pyr@ and ok by millert@
* add support to commit modified files to branches.joris2007-09-241-3/+5
|
* make sure when running update -r on existing files to overwritejoris2007-09-231-1/+4
| | | | the sticky directory tag with it. since -r gets priority.
* pass FILE_HAS_FLAG towards the update code so it can identifyjoris2007-09-231-1/+3
| | | | if a given tag is present in the RCSfile or not.
* better branching/sticky tag support, no branch commits yet though.joris2007-09-221-19/+39
|
* we no longer create a 0 sized file in our /tmp/cvs-serv<pid> serverjoris2007-09-221-4/+14
| | | | | | | 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/
* Imported atomicio interface.tobias2007-09-171-16/+8
| | | | Requested by ray@, OK joris@
* Added support for checkout -p with local repository.tobias2007-09-091-5/+12
| | | | OK joris@
* Do not fatal if getpwuid() fails, instead ignore user configuration files.tobias2007-09-071-1/+4
| | | | OK joris@
* Rework the way opencvs works in relation to files in the Attic/:joris2007-07-031-36/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Sync revisions and time buffers size to be consistent with each others.xsa2007-06-281-3/+3
| | | | | Simplifies further size tweaks if needed. OK niallo@ ray@.
* add support for cvs rlog.niallo2007-06-261-12/+19
| | | | | | from Mickey. ok joris@ ray@
* remove a fatal i committed by accident.niallo2007-06-041-5/+1
|
* add support for local and remote branch checkout. for example,niallo2007-06-011-26/+42
| | | | | | | cvs co -rOPENBSD_3_0 works now. along the way, simplify and rationalise code and fix a few nits. ok joris@ xsa@ ray@
* general includes cleanup sweep. ok joris@ niallo@otto2007-02-221-5/+10
|
* Simplify cvs_buf_differ(). Also cvs_buf_differ(), a comparisonray2007-02-211-2/+3
| | | | | | function, should not do any resource freeing. OK joris@.
* Fix const inconsistencies, void pointer artithmetic and a few otherotto2007-02-191-3/+3
| | | | things. now gcc -Wall and lint are more happy. ok joris@ xsa@
* correctly skip invalid entries when usingjoris2007-02-091-2/+2
| | | | | | getdirentries(2). ok otto@
* remove the cvs_file_classify() `loud' argument, it was usedjoris2007-02-091-2/+2
| | | | | | in the old school days and serves no purpose what so ever now. otto@ mentioned this to me a while ago
* fstat() -> lstat() in a few select cases,todd2007-02-071-3/+3
| | | | | | this fixes a bug where opencvs update would abort if a link existed that pointed to a non-existent file/dir ok joris@
* snprintf() -> xsnprintf()xsa2007-01-311-32/+13
|
* no longer spit out that you can add new files using 'cvs add',joris2007-01-291-8/+1
| | | | | | it is pretty obvious on itself. ok niallo@ xsa@
* remove debug printfs that sneaked in.joris2007-01-281-2/+1
|
* add merging support in both local and remote sides.joris2007-01-281-1/+2
| | | | tested by many, thanks.
* missed a case for CVS_CMD_ADD from last commitjoris2007-01-271-2/+2
|
* by default let cvs_file_classify complain about certain casesjoris2007-01-271-50/+41
| | | | | | and fix some warnings that should not come up for certain commands. ok niallo@ otto@
* Handle CVS/Entries and file timestamp correctly so we dojoris2007-01-261-4/+2
| | | | | | | | | not mistakenly see a file as Modified while it is not. As a result, we can remove the very hackish cvs_hack_time() and GNU cvs and opencvs should almost get along now. lotsa help and okay The otto@
* use more stack allocations for fixed size buffers. ok xsa@ joris@otto2007-01-251-37/+7
|
* Don't fatal() when unexpected files are encountered in the workingray2007-01-231-3/+14
| | | | | | | copy. Allows obj/ directories to exist (which are typically symlinks.) OK joris@