summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix -fno-common issues; ok mortimerderaadt2021-01-273-9/+11
|
* Accommodate POSIX basename(3) that takes a non-const parameter andnaddy2020-10-197-44/+106
| | | | | | may modify the string buffer. ok florian@ millert@
* Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.stsp2020-06-261-2/+9
| | | | | | | | | | | | | | | | | | | | | Merges with a file that lacks newlines (\n) were triggering a fatal error. This could be easily reproduced with merge(1) and diff3(1): $ echo foo > foo $ echo bar > bar $ echo -n baz > baz $ merge -p foo bar baz merge: failed to merge $ diff3 -E foo bar baz 1a ======= diff3prog: logic error $ Fix this by properly handling short reads from the third file argument. Only the third file argument triggered the problem. The other input files were already handled correctly. ok millert@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-2810-27/+27
| | | | | | 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.
* asprintf returns -1, not an arbitrary value < 0. Also upon error thederaadt2019-06-281-2/+2
| | | | | | | (very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated
* Delete unnecessary <libgen.h> #includesguenther2018-12-301-2/+1
| | | | ok deraadt@
* fix incorrect usage of the .Bx macro;schwarze2018-12-051-5/+3
| | | | | one case reported by Fabio Scotoni <fabio at esse dot ch>, the rest found with regress/usr.bin/mandoc/db/dbm_dump
* don't run cvs_client_sendfile() if its file_type is CVS_DIR, but do notjoris2018-07-141-2/+2
| | | | | | depend on it being CVS_FILE explicitly. unbreaks remote operations on removed files.
* fix const related warnings; ok millert@otto2017-08-289-24/+24
|
* Use xasprintf() instead of calloc() + strlcpy() + memcpy() tomillert2017-08-281-7/+3
| | | | | | generate the log line. Fixes a clang warning about using the wrong size argument in strlcpy(). The existing code was safe but not good strlcpy() practice. OK otto@
* When executing ssh, use "--" to indicate end of arguments before themillert2017-08-211-2/+3
| | | | host name. Adapted from a MirBSD diff by Thorsten Glaser.
* Add missing <time.h> header.okan2017-07-202-2/+4
| | | | ok joris@
* If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.joris2017-06-011-2/+4
| | | | | Otherwise we end up calling cvs_repository_unlock() with garbage from the stack if we're dealing with a remote cvsroot.
* Don't look at file_type until after cvs_remote_classify_file() was called.joris2017-06-011-5/+2
| | | | The file status may be unknown until after that call.
* Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.joris2017-06-0122-82/+93
| | | | Instead use cvsroot_is_local() and cvsroot_is_remote().
* Do not use CVS_LOCK_REPO for committing.joris2017-05-311-2/+2
| | | | | | | This flag tells our file recursion code that for each directory entered we should lock it. Commit however locks all relevant directories on its own when it is about to make changes and should not depend on the file recursion code to do so.
* Plug memleak in rcs_translate_tag() that was causing havoc on large repos.joris2017-05-311-1/+3
|
* When unlocking a directory only unlock the given one rather then all repo_locks.joris2017-05-311-3/+3
|
* fix indentationjoris2017-05-311-2/+2
|
* Fix opencvs tag so it does not attempt to to local operations in a remote setup.joris2017-05-311-51/+46
| | | | While here make sure the "up-to-date" check (-c) works as one expects.
* cvs_file_classify() was making the mistake of only taking over a stickyjoris2017-05-292-5/+3
| | | | | | | tag from Entries for a given file if the sticky tag is present. while changing this we can simplify some logic in update.c on how it decides what tag to use for file classification.
* Let opencvs show ignored files on import, not showing them is just confusing.joris2017-05-283-6/+20
| | | | ok stsp@
* Don't allow opencvs to commit towards tags that are not branches.joris2017-05-281-43/+7
| | | | | | | Gets rid of the old logic that wasn't working and replaced it with a simplified version. ok stsp@
* Teach opencvs status to display the sticky tag according to what it reallyjoris2017-05-281-3/+8
| | | | | | represents if it is a branch or a revision. ok stsp@
* Bring the opencvs log message template inline with other cvs implementations.joris2017-05-281-5/+5
| | | | ok stsp@
* Don't use ce_time if we are running as a server, it won't be present.joris2016-11-031-3/+7
|
* minor whitespace fixes.joris2016-10-271-3/+2
|
* Using bitwise OR along with two assignments in the conditional ofmillert2016-10-181-2/+7
| | | | | | a while() loop is a trap for the unwary programmer (albeit a clever trap). Break this up into two separate assignments and using boolean OR for clarity. OK otto@
* Add the branch revision to the status output much like GNU cvs does.joris2016-10-181-6/+19
| | | | OK millert@
* Remove useless n=n assignment in the first parse of a for().millert2016-10-161-2/+2
| | | | It was already removed from the rcs version by nicm@.
* Quiet compiler warnings. OK tomc@ tb@millert2016-10-159-33/+31
|
* Fix update -r and -A.fcambus2016-10-141-5/+3
| | | | | | | | | In certain cases update -r and update -A would not properly set or reset the sticky tag for file(s). From Joris Vink. OK millert@
* rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.fcambus2016-10-1318-127/+98
| | | | OK millert@
* Fix revision lookups for branches. Properly perform a revisionmillert2016-10-131-12/+11
| | | | | lookup so update -r actually works again, as a bonus throw a more correct error when the revision could not be found. From Joris Vink.
* When allocating the h_table array use the size of struct hash_head,millert2016-10-121-2/+2
| | | | not the size of a pointer. From Joris Vink. OK fcambus@
* Use the correct type for p. From Joris Vink.fcambus2016-10-121-2/+3
| | | | OK tb@
* Add missing getpw pledgetb2016-09-041-2/+2
| | | | ok deraadt
* When the commit message is empty, don't default to c)ontinuetb2016-08-161-5/+5
| | | | | | | | | (committing without log message) but a)bort. Also, accept the uppercase versions of the choices. Matches the corresponding change of behavior of GNU cvs. suggested by & ok jcs
* more e-mail -> emailmmcc2015-12-241-3/+3
|
* commited -> committedmmcc2015-12-221-3/+3
|
* Remove NULL-checks before free(). ok tb@mmcc2015-12-091-3/+2
|
* opencvs can use pledge "stdio rpath wpath cpath fattr proc exec".deraadt2015-11-191-1/+5
| | | | I have not looked into adding stricter pledges later in the code.
* Merge xmalloc.[ch] files across base, skipping OpenSSH for now.tobias2015-11-171-24/+23
| | | | ok nicm
* Remove xfree(), like already done for RCS. From Michael W Bombardieri,nicm2015-11-0534-372/+297
| | | | ok mmcc
* Add brackets to clarify assignments that are the result of a test operator.jsg2015-09-051-2/+2
| | | | ok deraadt@ looks correct millert@ jung@
* Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopederaadt2015-08-202-7/+7
| | | | ok krw millert
* Add support for commit ids to opencvs status.stsp2015-04-041-1/+12
| | | | Patch by joris via tech@; reminded by tedu
* Fix modified timestamp in output of opencvs status.stsp2015-04-043-6/+12
| | | | Patch by joris via tech@; reminded by tedu
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-056-7/+12
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-1635-213/+224
| | | | | | | | | 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)