summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/commit.c
AgeCommit message (Collapse)Author
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.
2008-08-29Pre-commit checks (CVSROOT/commitinfo) are run before log message isTobias Stoeckmann
requested. Do this for GNU cvs compatibility, too. ok joris
2008-07-08make these compile cleanlyJoris Vink
2008-06-15Support the addition of new files in branches.Tobias Stoeckmann
ok joris
2008-06-14Conforming to RCS specification, it is possible but unlikely to encounterTobias Stoeckmann
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
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-10set tag_new if its available so it can get passed to loginfoJoris Vink
2008-06-10switch back to a single log message in local mode so we are compliantJoris Vink
with a remote setup. fixes a very annoying bug with loginfo as well. ok tobias@
2008-06-10styleJoris Vink
2008-06-10New trigger framework that allows us to run the required scriptsJoris Vink
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@
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-08Handle commits on a per-directory basis instead handling all of them atTobias Stoeckmann
once in local setup. Also added '!' to reuse typed log message for all following directories. ok joris
2008-06-08Properly build up path to description files (descr entry in RCS files ifTobias Stoeckmann
you add a file with -m message). ok joris
2008-05-17Full support of branches added. We lacked proper support of multipleTobias Stoeckmann
branch entry points in one revision as well as branches which started from other branches. ok joris
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-02-27prevent file racesJoris Vink
ok tobias@
2008-02-20With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore.Tobias Stoeckmann
OK joris@
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-10do not allow commits to files that have a sticky date setJoris Vink
2008-02-04CVSROOT/modules:Joris Vink
correct -i and -o usage -i runs the program specified on commit -o runs the program specified on checkout
2008-02-04Added -k flag support for all commands which support it.Tobias Stoeckmann
OK joris@
2008-01-31free RCSNUM's when we are done with them;Joris Vink
ok tobias@
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-29Properly free dynamically allocated memory. Also skip needless checks.Tobias Stoeckmann
> Diff from Igor Zinovik
2008-01-28Zapped some variables which made the source harder to read (and to verify).Tobias Stoeckmann
> Diff from Igor Zinovik
2008-01-28checkout's options -m and -F are mutually exclusive. Also watch out toTobias Stoeckmann
properly free arguments if options are supplied multiple times. OK ray@ > Diff from Igor Zinovik
2008-01-28Properly handle -R -- although it is default, it may be overwritten mit -lTobias Stoeckmann
in front of it. OK joris@, xsa@ > Diff from Igor Zinovik
2008-01-13Revision buffers are supposed to be of size CVS_REV_BUFSZ (32) insteadTobias Stoeckmann
of 24. OK xsa@ > Diff from Igor Zinovik.
2008-01-13Typos fixed.Tobias Stoeckmann
OK xsa@ > Diff from Igor Zinovik.
2008-01-10Our keyword expansion had a big flaw, due to this construction:Tobias Stoeckmann
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.
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-10-08do not try to reset the default branch if the RCS fileJoris Vink
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.
2007-10-03reset the default branch early on so rcs_head_get() does not screw us upJoris Vink
and returns a possibly wrong revision as 'current revision'. noticed by tobias@ his regress testing
2007-09-24unused varsJoris Vink
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-22better branching/sticky tag support, no branch commits yet though.Joris Vink
2007-08-30properly send our log message to the server using Argumentx, so weJoris Vink
no longer break when the log message has multiple lines. from Tobias Stoeckmann, thanks for doing my work!
2007-06-28When commiting to a server in a remote setup classifyJoris Vink
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@
2007-06-18first stab at history stuff for opencvs, currently only writesJoris Vink
to CVSROOT/history but cannot parse it yet with the 'history' command. "Commit it." ray@
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-09remove the cvs_file_classify() `loud' argument, it was usedJoris Vink
in the old school days and serves no purpose what so ever now. otto@ mentioned this to me a while ago
2007-02-01change mode of a newly created rcs file in the repository to 0444Otto Moerbeek
ok jorix@ xsa@
2007-01-31snprintf() -> xsnprintf()Xavier Santolaria
2007-01-26- support [-k mode] for the add commandXavier Santolaria
- do not let the file keyword expension options (-k) disappear from the Entries file when doing a commit/update/checkout - be sure the expension mode gets written to the RCS file when a file is added/committed in the first place problems raised by otto@; tests/ok otto@ and joris@.
2007-01-25use more stack allocations for fixed size buffers. ok xsa@ joris@Otto Moerbeek
2007-01-18send -l Argument to server when appropriate.Xavier Santolaria
2007-01-14move things around in rcs_rev_getbuf() and rcs_rev_write_fd()Joris Vink
so that we do keyword expansion on-the-fly if required instead of obtaining the revision in memory first, running over the revision lines while expanding keywords and only then writing them to the fd or memory buffer. this drasticly decreases cpu usage by opencvs on very large trees (like src). OK niallo@