summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/add.c
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2017-06-01Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.Joris Vink
Instead use cvsroot_is_local() and cvsroot_is_remote().
2016-10-13rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.Frederic Cambus
OK millert@
2015-11-05Remove xfree(), like already done for RCS. From Michael W Bombardieri,Nicholas Marriott
ok mmcc
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2010-11-11Nuke dead assignments and a dead function, from Michael W BombardieriNicholas Marriott
using lint.
2010-07-23Reduce variable/function name and whitespace differences betweenRay Lai
cvs/rcs. OK xsa zinovik
2010-04-04OpenCVS is very annoying and incorrect when user tries to add severalzinovik
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@
2009-02-21use FILE_ON_DISK flags when we need to verify if a fileJoris Vink
exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
2009-01-02Add format attributes to functions that use variable arguments andCan Erkin Acar
make the code -Wformat=2 clean. ok joris@ xsa@
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-14No need to add \n at the end of format string for a fatal call.Tobias Stoeckmann
2008-06-14Don't trick user into believing that it's actually possible to add a fileTobias Stoeckmann
to repository which is even ready to be checked out. "probably right" joris
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-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-22expension -> expansionTobias Stoeckmann
ok joris, xsa (quite some time ago)
2008-03-09do not use CR_REPO in a remote setup, that will obviously fail.Joris Vink
2008-03-08add checkout/update -j support.Joris Vink
still has some rough edges.
2008-03-01spacingTheo de Raadt
2008-02-09Introduce cvs_ent_line_str() - formats CVS/Entries lines.Xavier Santolaria
OK tobias@.
2008-02-06Improve add command:Tobias Stoeckmann
* fix server-side add * support add in branches * do not add files in N-tagged directories OK joris@
2008-02-04unbreak add in a remote setup.Joris Vink
bad tobias, no cookie.
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-04Added -k flag support for all commands which support it.Tobias Stoeckmann
OK joris@
2008-01-31Our directory entries in CVS/Entries had one slash too much -- zapped.Tobias Stoeckmann
OK xsa@
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-29There is no need to xstrdup() optarg.Tobias Stoeckmann
2008-01-10another strcspn() roundTobias Stoeckmann
2008-01-10Handle the addition of directories right, especially in remote setups withTobias Stoeckmann
GNU cvs as a server.
2008-01-10Properly handle "cvs add" on a client/server setup with GNU cvs as a client.Tobias 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-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-08-29missing xfree();Joris Vink
from Igor Zinovik, thanks.
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-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
2007-02-17cvs_path_cat() removal since we can now easily handle thatXavier Santolaria
functionality w/ xsnprintf(); Initial diff started by thib@. OK thib@ joris@.
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-01-31snprintf() -> xsnprintf()Xavier Santolaria
2007-01-27- do not try to add non-existing filesJoris Vink
- do not overwrite the contents of the file when the file was removed and you try to re-add it. ok otto@
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-26extra xfree leftover; from tbert.Otto Moerbeek
2007-01-25use more stack allocations for fixed size buffers. ok xsa@ joris@Otto Moerbeek
2007-01-13remove BUF * argument from cvs_checkout_file() it willJoris Vink
no longer be used, ever.
2007-01-12do not leak memory from rcs_head_get()Joris Vink
ok niallo@
2007-01-12fix incorrect output which was driving me more then crazyJoris Vink
2007-01-11in a remote setup:Joris Vink
do not connect to the remote server until we are sure all the options passed to the commands are valid. noticed by xsa@