summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/add.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.joris2017-06-011-4/+4
| | | | Instead use cvsroot_is_local() and cvsroot_is_remote().
* rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.fcambus2016-10-131-3/+2
| | | | OK millert@
* Remove xfree(), like already done for RCS. From Michael W Bombardieri,nicm2015-11-051-12/+10
| | | | ok mmcc
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-16/+16
| | | | | | | | | 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)
* Nuke dead assignments and a dead function, from Michael W Bombardierinicm2010-11-111-3/+2
| | | | using lint.
* Reduce variable/function name and whitespace differences betweenray2010-07-231-10/+10
| | | | | | cvs/rcs. OK xsa zinovik
* OpenCVS is very annoying and incorrect when user tries to add severalzinovik2010-04-041-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | files at a time. OpenCVS does the following: # touch a b c # opencvs add a b c opencvs add: scheduling file 'a' for addition opencvs add: use 'opencvs commit' to add this file permanently opencvs add: scheduling file 'b' for addition opencvs add: use 'opencvs commit' to add this file permanently opencvs add: scheduling file 'c' for addition opencvs add: use 'opencvs commit' to add this file permanently This behaviour was added in -r 1.48 of add.c file. This commit makes OpenCVS behave like GNU cvs: # touch a b c # opencvs add a b c opencvs add: scheduling file 'a' for addition opencvs add: scheduling file 'b' for addition opencvs add: scheduling file 'c' for addition opencvs add: use 'opencvs commit' to add these files permanently ok deraadt@, xsa@
* use FILE_ON_DISK flags when we need to verify if a filejoris2009-02-211-3/+3
| | | | | exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
* Add format attributes to functions that use variable arguments andcanacar2009-01-021-3/+3
| | | | make the code -Wformat=2 clean. ok joris@ xsa@
* Support the addition of new files in branches.tobias2008-06-151-1/+73
| | | | ok joris
* Conforming to RCS specification, it is possible but unlikely to encountertobias2008-06-141-11/+9
| | | | | | | | 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-4/+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@
* No need to add \n at the end of format string for a fatal call.tobias2008-06-141-3/+3
|
* Don't trick user into believing that it's actually possible to add a filetobias2008-06-141-1/+2
| | | | | | to repository which is even ready to be checked out. "probably right" joris
* New trigger framework that allows us to run the required scriptsjoris2008-06-101-2/+52
| | | | | | | | | | 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 build up path to description files (descr entry in RCS files iftobias2008-06-081-3/+4
| | | | | | you add a file with -m message). ok joris
* expension -> expansiontobias2008-05-221-2/+2
| | | | ok joris, xsa (quite some time ago)
* do not use CR_REPO in a remote setup, that will obviously fail.joris2008-03-091-1/+2
|
* add checkout/update -j support.joris2008-03-081-3/+3
| | | | still has some rough edges.
* spacingderaadt2008-03-011-2/+1
|
* Introduce cvs_ent_line_str() - formats CVS/Entries lines.xsa2008-02-091-13/+19
| | | | OK tobias@.
* Improve add command:tobias2008-02-061-6/+29
| | | | | | | | * fix server-side add * support add in branches * do not add files in N-tagged directories OK joris@
* unbreak add in a remote setup.joris2008-02-041-2/+2
| | | | bad tobias, no cookie.
* 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@
* Added -k flag support for all commands which support it.tobias2008-02-041-8/+7
| | | | OK joris@
* Our directory entries in CVS/Entries had one slash too much -- zapped.tobias2008-01-311-3/+3
| | | | OK xsa@
* 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@
* There is no need to xstrdup() optarg.tobias2008-01-291-2/+2
|
* another strcspn() roundtobias2008-01-101-3/+2
|
* Handle the addition of directories right, especially in remote setups withtobias2008-01-101-6/+36
| | | | GNU cvs as a server.
* Properly handle "cvs add" on a client/server setup with GNU cvs as a client.tobias2008-01-101-4/+10
|
* RCS files without head keyword mustn't segfault our implementation. Onlytobias2008-01-101-1/+7
| | | | | command that supports such files is "cvs status", therefore properly handle them in all other commands, too.
* 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-2/+2
|
* properly send our log message to the server using Argumentx, so wejoris2007-08-301-2/+2
| | | | | | no longer break when the log message has multiple lines. from Tobias Stoeckmann, thanks for doing my work!
* missing xfree();joris2007-08-291-1/+2
| | | | from Igor Zinovik, thanks.
* Sync revisions and time buffers size to be consistent with each others.xsa2007-06-281-3/+4
| | | | | Simplifies further size tweaks if needed. OK niallo@ ray@.
* general includes cleanup sweep. ok joris@ niallo@otto2007-02-221-4/+6
|
* cvs_path_cat() removal since we can now easily handle thatxsa2007-02-171-7/+5
| | | | | functionality w/ xsnprintf(); Initial diff started by thib@. OK thib@ joris@.
* 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
* snprintf() -> xsnprintf()xsa2007-01-311-23/+12
|
* - do not try to add non-existing filesjoris2007-01-271-5/+8
| | | | | | | - do not overwrite the contents of the file when the file was removed and you try to re-add it. ok otto@
* - support [-k mode] for the add commandxsa2007-01-261-6/+24
| | | | | | | | - 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@.
* extra xfree leftover; from tbert.otto2007-01-261-2/+1
|
* use more stack allocations for fixed size buffers. ok xsa@ joris@otto2007-01-251-21/+7
|
* remove BUF * argument from cvs_checkout_file() it willjoris2007-01-131-7/+2
| | | | no longer be used, ever.
* do not leak memory from rcs_head_get()joris2007-01-121-4/+8
| | | | ok niallo@
* fix incorrect output which was driving me more then crazyjoris2007-01-121-5/+4
|
* in a remote setup:joris2007-01-111-1/+2
| | | | | | | do not connect to the remote server until we are sure all the options passed to the commands are valid. noticed by xsa@