summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* change returning type to void like it is done in OpenRCS:buf_release()zinovik2010-08-011-3/+3
| | | | ok nicm@
* introduce macro SIZE_LEFT and function buf_grow() from OpenRCSzinovik2010-07-311-15/+24
| | | | | | buf_grow() replaces macro BUF_GROW() ok nicm@, ray@
* When looking for revision, break out of the loop at the end rather thannicm2010-07-311-1/+8
| | | | | | | | | | | | | | looping forever. This prevents the server going into an infinite loop when the repository is behind the checkout, but the behaviour is not correct (it is an error rather than ignoring the file), so mark with an XXX for now. Some underlying OpenCVS functions are too fatal()-happy and will probably need to be changed in order to fix this properly. Problem reported by sthen. ok xsa ray
* Checking for -1 as an overflow value is pretty absurd. Returningray2010-07-311-5/+2
| | | | | | | the unix epoch is equally absurd. Just return Start for now. We may add overflow checks in the future. OK xsa nicm
* Check date_parse return values.ray2010-07-305-20/+41
| | | | OK xsa
* Replace abort(), fatal(), and errx() with return -1, since date_parseray2010-07-291-2/+2
| | | | | | returns -1 on error. OK nicm
* Support -U and -C to specify the context length for "cvs diff".nicm2010-07-283-17/+45
| | | | | | | This doesn't alter cvs rdiff, where -U and -C are not support by GNU cvs. ok sthen zinovik
* Reduce variable/function name and whitespace differences betweenray2010-07-2327-325/+325
| | | | | | cvs/rcs. OK xsa zinovik
* Clean up struct tm handling. Instead of calling gmtime/localtimeray2010-07-231-30/+15
| | | | | | | | | | | and making copies (among other weird dances), use reentrant versions. Not being able to tell the time is a fatal error, so die if that happens. Diff originally from nicm. OK nicm xsa
* Rename a bunch of variables and functions, removing the cvs_/rcs_ray2010-07-2312-52/+51
| | | | | | prefixes to reduce differences between cvs and rcs files. "yes!" nicm
* Only use username if author is NULL. Fixes "ci -wusername" when runray2010-07-211-15/+9
| | | | | | as root. OK nicm
* Combine two diff_output lines into one, from diff.ray2010-07-161-9/+5
| | | | OK stsp xsa nicm
* Die immediately if pread fails. It's a fatal error so treat it asray2010-07-151-6/+3
| | | | | | | | such. Besides, we weren't handling the NULL being returned. From diff. Minor nit by nicm. OK xsa stsp nicm
* Sync with diff/diffreg.c r1.75:ray2010-07-151-5/+4
| | | | | | | Return -1 on error as advertised. Handle case when only one stream failed. OK xsa, stsp
* Don't silently overwrite untracked local files with newly-addednicm2010-07-131-4/+11
| | | | | | repository files. slightly earlier version ok zinovik xsa
* Do not put the file into conflict if it is no longer modified (user hasnicm2010-07-131-4/+1
| | | | | | edited it back to repository state). ok zinovik
* PR 6423 fix for cvs too, requested by xsa@.nicm2010-07-131-2/+2
|
* Make cvs and rcs consistent in what characters they'll accept innaddy2010-07-091-3/+3
| | | | | | | | symbol/tag names: require the first character to be a letter and allow any printable character (except the RCS specials $,.:;@) afterwards. This matches GNU cvs. ok xsa@ zinovik@ stsp@
* when opencvs is started with trace option `-t' it must print function itzinovik2010-07-091-3/+3
| | | | | | | | enters, even if it was executed simultaneously with `-n' (no exec option). cvs_unedit_local() does not conform that behaviour, so lets make it behave like all other functions. ok xsa@, stsp@
* Increase buffer size to support large pathnames. Committing onmillert2010-04-191-2/+3
| | | | behalf of stsp@ who is travelling. OK miod@ deraadt@ xsa@ jsg@
* 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@
* This diff synchronizes rcs parser code with OpenRCS. It shrinks code by 3zinovik2010-03-301-7/+3
| | | | | | | lines, but does exactly the same thing. It also removes unneeded variable `buf' ok deraadt@, xsa@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-12/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* release storage after asprintf. ok sthen@martynas2009-06-271-1/+3
|
* Use correct synopses for checkout and export when an invalid -k optionsthen2009-06-211-3/+3
| | | | is specified. From Dawe in user/6177.
* More cvs/diff/rcs convergence:ray2009-06-078-33/+29
| | | | | | | | | | | 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-068-96/+120
| | | | | | | cvs diff -t now works. There should be no functional change otherwise. OK millert
* add options 'a' and 'd' to the getopt string sojoris2009-04-291-2/+2
| | | | | | we can actually use them. bad sthen@ and bad me for missing this :)
* tweak previous;jmc2009-04-281-7/+7
|
* support some additional diff options: -a, -b, -d, -wsthen2009-04-284-17/+62
| | | | ok joris@
* bleh, do not force the client to support certain responses.joris2009-04-181-6/+8
| | | | | | | | this fixes annotate on our cvsweb. the cvsweb script does very funky things in order to get the job done, but hey we should support it. i'm shocked nobody noticed annotate wasnt working, djees. found by jacekm@
* with the recent module-expand changes, we need to usejoris2009-04-101-13/+3
| | | | | | | | the correct repository path in Set-sticky and Clear-sticky otherwise we'll end up with stuff like src/bin/ls/src/bin/ls in CVS/Repository which pretty much breaks. noticed & ok sthen@
* do not try to send a added file that is no longer on diskjoris2009-04-071-4/+9
| | | | | | towards the server. problem spotted and diff tested by sthen@
* make sure we handle allowed options in cvs_export() insteadjoris2009-04-061-1/+3
| | | | | of ignoring them, even if they are just stubs. unbreaks export with gnu cvs clients.
* don't try to free stuff we shouldnt free, really.joris2009-04-041-6/+1
|
* properly expand modules if requested by the client,joris2009-04-043-4/+30
| | | | | | | | | | | | | this option is needed so gnu cvs clients can play along properly when running checkout <module> in a remote setup. if we do not support this, gnu cvs refuses to send us any existing files already on disk and opencvs will consider everything as NEEDS_CHECKOUT, instead of running an update on existing stuff. problem noticed by fgsch@ commited with opencvs, but please everybody else do not use opencvs to commit yet.
* i fucked up last night, bad so partially revert a piece ofjoris2009-04-031-1/+6
| | | | | | | | | | code that wasnt suppose to dissapear: for uptodate files, we want to compare rev1 against file_rcsrev to see if we wish to diff or not. saves a bit off logic. commited with opencvs, permission by deraadt@
* my last commit to diff.c broke diffing in some cases,joris2009-04-031-4/+1
| | | | | | | noticed the hard way here at work. commiting with opencvs, permission by deraadt@
* properly deal with uptodate files server-side, as they do notjoris2009-04-021-16/+24
| | | | | | | | | | | have a file on disk we'll need to load the revision into a temporary file to do our comparison. do not even bother trying diffing 2 off the same revisions either. causes less noise... way less. you guessed it, commited using opencvs entirely. with permission from deraadt@
* if ce_conflict != NULL, the file should be sentjoris2009-04-021-2/+3
| | | | | | | to the server for verification. commited with opencvs, permission by deraadt@
* make sure diffing -rTAG -rTAG works even if files are uptodatejoris2009-04-021-1/+2
| | | | | commited with opencvs, with permission by deraadt@
* in client mode, be sure to consider the file modified if a conflictjoris2009-04-012-4/+4
| | | | | | | | | | | exists in the CVS/Entries file, otherwise the server has no way of determining if the user has resolved it or not. also in client mode, send a conflict as Â"+=" not "+" alone, so other cvs implementations get it. commited entirely with opencvs, with permission by deraadt@
* kill rp_lines, we do not need it when parsing an RCS file.joris2009-03-301-8/+2
| | | | | incendently, commit made using opencvs entirely. with permission from deraadt@
* printf() -> cvs_printf() so it works under server mode as welljoris2009-03-291-2/+2
| | | | spotted by Jonathan Armani <dbd@asystant.net>
* when i fixed to attic handling i forgot one special casejoris2009-03-281-1/+8
| | | | | | | that we'd hit in normal checkouts/updates for duplicate file and dirs. found and diff tested by krw@
* make sure that when we try to send a Set-sticky to the client,joris2009-03-271-3/+5
| | | | | | | we only do so if the file we're checking out was not supplied on the command-line. Otherwise we'll end up setting CVS/Tag for the entire directory instead of slapping a sticky tag only on the file supplied.
* fix the way Attic is handled in our recursion code, so wejoris2009-03-265-49/+77
| | | | | | | | | | | | | 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@
* "Logging dirname" needs to be properly shown when running log/rlog.joris2009-03-261-7/+7
| | | | spotted by deraadt@
* switch our file and directory lists to RB trees (see tree(3)),joris2009-03-256-57/+73
| | | | so we can benefit from faster lookup times while recursing.
* prevent a very difficult to reach, but possible use after free.joris2009-03-251-9/+5
| | | | ok tobias@