summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use -u when diff context is 3, from Michael W Bombardieri, tweaked bynicm2011-04-201-2/+2
| | | | millert.
* Check date_parse return values.ray2010-07-301-3/+5
| | | | OK xsa
* Support -U and -C to specify the context length for "cvs diff".nicm2010-07-281-4/+31
| | | | | | | 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-231-6/+6
| | | | | | cvs/rcs. OK xsa zinovik
* Rename a bunch of variables and functions, removing the cvs_/rcs_ray2010-07-231-2/+2
| | | | | | prefixes to reduce differences between cvs and rcs files. "yes!" nicm
* More cvs/diff/rcs convergence:ray2009-06-071-2/+2
| | | | | | | | | | | 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-061-10/+15
| | | | | | | 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 :)
* support some additional diff options: -a, -b, -d, -wsthen2009-04-281-3/+19
| | | | ok joris@
* 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@
* make sure diffing -rTAG -rTAG works even if files are uptodatejoris2009-04-021-1/+2
| | | | | commited with opencvs, with permission by deraadt@
* any directory messages are, believe it or not, suppose to go to LP_ERRjoris2009-03-231-4/+3
| | | | | | | instead of LP_NOTICE, while here modify output for non-existing files to match "? foobar" instead of "cannot find foobar". makes our output a little less alien and a little bit more gnuish.
* do not diff files server-side that are uptodate but require a patch,joris2009-03-191-1/+4
| | | | | | | as the client does not provide these files at all because they are not modified in anyway. otherwise this results in bad mojo. found by myself and sthen@
* use FILE_ON_DISK flags when we need to verify if a filejoris2009-02-211-7/+7
| | | | | exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
* Properly send -D arguments to server when run as a client. Issue spottedtobias2008-06-201-2/+12
| | | | | | by sthen. ok joris
* If -N has been specified along -D for diff, treat invalid dates as non-existent file. Spotted by sthen. ok joristobias2008-06-201-6/+12
|
* unbreak diff for newly added files, tsk.joris2008-06-171-2/+2
|
* Conforming to RCS specification, it is possible but unlikely to encountertobias2008-06-141-1/+7
| | | | | | | | 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
* do not count on files that are uptodate to be on disk in a remote setup.joris2008-06-111-4/+4
|
* Avoid possible NULL pointer dereferences by using reentrant versionstobias2008-06-111-6/+7
| | | | | | of time functions. ok joris
* Omit "cannot find file" on server-side if client runs "diff" on an up-to-datetobias2008-06-101-5/+7
| | | | | | file, because it won't be sent to server then. ok joris
* diff -D support, also a change in diff_internals to properly printtobias2008-05-301-12/+45
| | | | file name or /dev/null, if file has been removed or added.
* Major rework of our cvs diff implementation fixes tons of GNU cvstobias2008-05-301-143/+173
| | | | | | | compatibility glitches and bugs which have been spotted by ray@ and Igor Zinovik. ok joris
* expension -> expansiontobias2008-05-221-2/+2
| | | | ok joris, xsa (quite some time ago)
* when a file was locally removed and a diff was done againststhen2008-03-131-2/+2
| | | | | | | | an opencvs server (with either gnu or opencvs as the client), no actual diff output was produced. traced to the typo fixed in this diff. ok joris
* Print the right synopsis for commands on error (especially if commandstobias2008-03-021-3/+7
| | | | | | share the same function: (r)tag, etc.). ok joris
* spacingderaadt2008-03-011-4/+4
|
* prevent file racesjoris2008-02-271-9/+22
| | | | ok tobias@
* Always end line that states diff options with a newline.tobias2008-02-271-2/+3
| | | | ok joris
* Cleanup buf implementation:tobias2008-02-111-3/+2
| | | | | | | | | | | | * 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.
* If run as server, (r)diff should properly write (r)diff into headertobias2008-02-091-2/+3
| | | | | | instead of "server". OK joris@
* r* commands have their own usage; don't check usage of their working dirtobias2008-02-041-4/+4
| | | | | | equivalents. OK joris@, xsa@
* Added -k flag support for all commands which support it.tobias2008-02-041-7/+26
| | | | OK joris@
* Added rdiff support. In order to do this, some output and option fixestobias2008-02-031-40/+173
| | | | | | had to be done for diff, too. OK joris@
* 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@
* Properly free dynamically allocated memory on error path.tobias2008-01-291-2/+5
| | | | > Diff from Igor Zinovik
* Properly handle -R -- although it is default, it may be overwritten mit -ltobias2008-01-281-2/+5
| | | | | | | | in front of it. OK joris@, xsa@ > Diff from Igor Zinovik
* better branching/sticky tag support, no branch commits yet though.joris2007-09-221-15/+22
|
* Sync revisions and time buffers size to be consistent with each others.xsa2007-06-281-2/+2
| | | | | Simplifies further size tweaks if needed. OK niallo@ ray@.
* fix diff output in a remote setup so our client does not freak out.joris2007-06-271-3/+3
| | | | noticed and "yes, that's much shinier" by ckuethe.
* general includes cleanup sweep. ok joris@ niallo@otto2007-02-221-3/+6
|
* 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
* Handle CVS/Entries and file timestamp correctly so we dojoris2007-01-261-2/+1
| | | | | | | | | not mistakenly see a file as Modified while it is not. As a result, we can remove the very hackish cvs_hack_time() and GNU cvs and opencvs should almost get along now. lotsa help and okay The otto@
* sweep opencvs for missing rcs_translate_tag() return checks.niallo2007-01-201-3/+5
|
* replace old diffing mechanisms with the new fluffy RCS stuff,joris2007-01-151-21/+21
| | | | okay niallo@
* move things around in rcs_rev_getbuf() and rcs_rev_write_fd()joris2007-01-141-7/+3
| | | | | | | | | | | 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@
* major re-work of the RCS api. this results in 100x performance improvements in some places and muchniallo2007-01-121-3/+3
| | | | | | | | | reduced memory usage. note that only checkout has been fully converted to use the new high-performance functions. other codepaths (e.g. update) still use the old method which is provided for backwards compatibility. we can convert the remaining slow bits over to the new api piece-by-piece. "commit this, now" joris@ brad@ tested, too.
* strl* overload, use xasprintf().xsa2007-01-111-30/+19
|