summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/commit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-13/+13
| | | | | | | | | 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)
* Move some global variables/statics to locals, from Michael Wnicm2011-12-271-2/+3
| | | | Bombardieri.
* Trivial code simplifying, from Michael W Bombardieri.nicm2011-04-201-15/+9
|
* Reduce variable/function name and whitespace differences betweenray2010-07-231-30/+30
| | | | | | cvs/rcs. OK xsa zinovik
* More cvs/diff/rcs convergence:ray2009-06-071-2/+2
| | | | | | | | | | | 1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and spacing. 2. One strchr -> strncspn. 3. diff had a weird thing where it set file[12] = ofile[12] but never updated file or ofile, then if file and ofile were different it freed it. I removed it. OK millert
* Sync some rcsdiff changes to cvsdiff. As a side effect,ray2009-06-061-2/+2
| | | | | | | cvs diff -t now works. There should be no functional change otherwise. OK millert
* fix the way Attic is handled in our recursion code, so wejoris2009-03-261-5/+5
| | | | | | | | | | | | | 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-13/+13
| | | | so we can benefit from faster lookup times while recursing.
* Pre-commit checks (CVSROOT/commitinfo) are run before log message istobias2008-08-291-13/+19
| | | | | | requested. Do this for GNU cvs compatibility, too. ok joris
* make these compile cleanlyjoris2008-07-081-2/+9
|
* Support the addition of new files in branches.tobias2008-06-151-33/+54
| | | | ok joris
* Conforming to RCS specification, it is possible but unlikely to encountertobias2008-06-141-3/+6
| | | | | | | | an RCS file which has no head revision set. Some commands actually can work with them (log, status) so support these files. Fixes A LOT of possible segmentation faults. ok joris
* don't always re-open the same CVS/Entries file, instead keep thejoris2008-06-141-2/+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@
* set tag_new if its available so it can get passed to loginfojoris2008-06-101-1/+3
|
* switch back to a single log message in local mode so we are compliantjoris2008-06-101-149/+68
| | | | | | | | with a remote setup. fixes a very annoying bug with loginfo as well. ok tobias@
* stylejoris2008-06-101-4/+4
|
* New trigger framework that allows us to run the required scriptsjoris2008-06-101-13/+150
| | | | | | | | | | defined in CVSROOT/commitinfo and CVSROOT/loginfo and so on. This enables the use of log_accum2 and all that other nice stuff we like. This was mostly written by Jonathan Armani with help from tobias@ and myself. ok tobias@
* Properly handle merged files and conflicts which may arrise while merge.tobias2008-06-091-21/+26
| | | | | | | 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.
* Handle commits on a per-directory basis instead handling all of them attobias2008-06-081-42/+105
| | | | | | | once in local setup. Also added '!' to reuse typed log message for all following directories. ok joris
* Properly build up path to description files (descr entry in RCS files iftobias2008-06-081-3/+3
| | | | | | you add a file with -m message). ok joris
* Full support of branches added. We lacked proper support of multipletobias2008-05-171-7/+10
| | | | | | | branch entry points in one revision as well as branches which started from other branches. ok joris
* proper repository locking:joris2008-03-091-2/+18
| | | | | | | - 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.
* prevent file racesjoris2008-02-271-5/+13
| | | | ok tobias@
* With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore.tobias2008-02-201-3/+1
| | | | OK joris@
* Cleanup buf implementation:tobias2008-02-111-9/+5
| | | | | | | | | | | | * 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.
* do not allow commits to files that have a sticky date setjoris2008-02-101-1/+8
|
* CVSROOT/modules:joris2008-02-041-3/+10
| | | | | | | correct -i and -o usage -i runs the program specified on commit -o runs the program specified on checkout
* Added -k flag support for all commands which support it.tobias2008-02-041-4/+4
| | | | OK joris@
* free RCSNUM's when we are done with them;joris2008-01-311-1/+5
| | | | ok tobias@
* Replaced the unused cvs_command variable cmd_req with cmd_flags, which statestobias2008-01-311-2/+2
| | | | | | | | | | | 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@
* Properly free dynamically allocated memory. Also skip needless checks.tobias2008-01-291-4/+18
| | | | > Diff from Igor Zinovik
* Zapped some variables which made the source harder to read (and to verify).tobias2008-01-281-8/+8
| | | | > Diff from Igor Zinovik
* checkout's options -m and -F are mutually exclusive. Also watch out totobias2008-01-281-2/+15
| | | | | | | | properly free arguments if options are supplied multiple times. OK ray@ > Diff from Igor Zinovik
* Properly handle -R -- although it is default, it may be overwritten mit -ltobias2008-01-281-1/+2
| | | | | | | | in front of it. OK joris@, xsa@ > Diff from Igor Zinovik
* Revision buffers are supposed to be of size CVS_REV_BUFSZ (32) insteadtobias2008-01-131-2/+2
| | | | | | | | of 24. OK xsa@ > Diff from Igor Zinovik.
* Typos fixed.tobias2008-01-131-2/+2
| | | | | | OK xsa@ > Diff from Igor Zinovik.
* Our keyword expansion had a big flaw, due to this construction:tobias2008-01-101-2/+2
| | | | | | | | | if (!(mode & RCS_KWEXP_NONE)) RCS_KWEXP_NONE is defined to 0, so expansion happened always. Left shifted all RCS_KWEXP defines and looked carefully at hard-coded values throughout the code.
* RCS files without head keyword mustn't segfault our implementation. Onlytobias2008-01-101-1/+4
| | | | | command that supports such files is "cvs status", therefore properly handle them in all other commands, too.
* do not try to reset the default branch if the RCS filejoris2007-10-081-2/+2
| | | | | | does not exist, fixes a segfault when commiting a new file. found by tobias@ who is going to make a nice little regression test for this.
* reset the default branch early on so rcs_head_get() does not screw us upjoris2007-10-031-6/+6
| | | | | | and returns a possibly wrong revision as 'current revision'. noticed by tobias@ his regress testing
* unused varsjoris2007-09-241-2/+2
|
* add support to commit modified files to branches.joris2007-09-241-29/+128
|
* make sure when running update -r on existing files to overwritejoris2007-09-231-2/+2
| | | | the sticky directory tag with it. since -r gets priority.
* better branching/sticky tag support, no branch commits yet though.joris2007-09-221-7/+7
|
* properly send our log message to the server using Argumentx, so wejoris2007-08-301-2/+3
| | | | | | no longer break when the log message has multiple lines. from Tobias Stoeckmann, thanks for doing my work!
* When commiting to a server in a remote setup classifyjoris2007-06-281-2/+5
| | | | | | | | the files based upon their entry in CVS/Entries instead of using the local classifying code and trying to locate the RCSfile on our local disks, which ofc does not work correctly. OK niallo@
* first stab at history stuff for opencvs, currently only writesjoris2007-06-181-2/+23
| | | | | | to CVSROOT/history but cannot parse it yet with the 'history' command. "Commit it." ray@
* add support for local and remote branch checkout. for example,niallo2007-06-011-2/+2
| | | | | | | 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-3/+7
|
* remove the cvs_file_classify() `loud' argument, it was usedjoris2007-02-091-7/+3
| | | | | | in the old school days and serves no purpose what so ever now. otto@ mentioned this to me a while ago