summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/diff.c
AgeCommit message (Collapse)Author
2009-06-07More cvs/diff/rcs convergence:Ray Lai
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
2009-06-06Sync some rcsdiff changes to cvsdiff. As a side effect,Ray Lai
cvs diff -t now works. There should be no functional change otherwise. OK millert
2009-04-29add options 'a' and 'd' to the getopt string soJoris Vink
we can actually use them. bad sthen@ and bad me for missing this :)
2009-04-28support some additional diff options: -a, -b, -d, -wStuart Henderson
ok joris@
2009-04-03i fucked up last night, bad so partially revert a piece ofJoris Vink
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@
2009-04-03my last commit to diff.c broke diffing in some cases,Joris Vink
noticed the hard way here at work. commiting with opencvs, permission by deraadt@
2009-04-02properly deal with uptodate files server-side, as they do notJoris Vink
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@
2009-04-02make sure diffing -rTAG -rTAG works even if files are uptodateJoris Vink
commited with opencvs, with permission by deraadt@
2009-03-23any directory messages are, believe it or not, suppose to go to LP_ERRJoris Vink
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.
2009-03-19do not diff files server-side that are uptodate but require a patch,Joris Vink
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@
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.
2008-06-20Properly send -D arguments to server when run as a client. Issue spottedTobias Stoeckmann
by sthen. ok joris
2008-06-20If -N has been specified along -D for diff, treat invalid dates as ↵Tobias Stoeckmann
non-existent file. Spotted by sthen. ok joris
2008-06-17unbreak diff for newly added files, tsk.Joris Vink
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-11do not count on files that are uptodate to be on disk in a remote setup.Joris Vink
2008-06-11Avoid possible NULL pointer dereferences by using reentrant versionsTobias Stoeckmann
of time functions. ok joris
2008-06-10Omit "cannot find file" on server-side if client runs "diff" on an up-to-dateTobias Stoeckmann
file, because it won't be sent to server then. ok joris
2008-05-30diff -D support, also a change in diff_internals to properly printTobias Stoeckmann
file name or /dev/null, if file has been removed or added.
2008-05-30Major rework of our cvs diff implementation fixes tons of GNU cvsTobias Stoeckmann
compatibility glitches and bugs which have been spotted by ray@ and Igor Zinovik. ok joris
2008-05-22expension -> expansionTobias Stoeckmann
ok joris, xsa (quite some time ago)
2008-03-13when a file was locally removed and a diff was done againstStuart Henderson
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
2008-03-02Print the right synopsis for commands on error (especially if commandsTobias Stoeckmann
share the same function: (r)tag, etc.). ok joris
2008-03-01spacingTheo de Raadt
2008-02-27prevent file racesJoris Vink
ok tobias@
2008-02-27Always end line that states diff options with a newline.Tobias Stoeckmann
ok joris
2008-02-11Cleanup buf implementation:Tobias Stoeckmann
* 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.
2008-02-09If run as server, (r)diff should properly write (r)diff into headerTobias Stoeckmann
instead of "server". OK joris@
2008-02-04r* commands have their own usage; don't check usage of their working dirTobias Stoeckmann
equivalents. OK joris@, xsa@
2008-02-04Added -k flag support for all commands which support it.Tobias Stoeckmann
OK joris@
2008-02-03Added rdiff support. In order to do this, some output and option fixesTobias Stoeckmann
had to be done for diff, too. OK joris@
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-29Properly free dynamically allocated memory on error path.Tobias Stoeckmann
> Diff from Igor Zinovik
2008-01-28Properly handle -R -- although it is default, it may be overwritten mit -lTobias Stoeckmann
in front of it. OK joris@, xsa@ > Diff from Igor Zinovik
2007-09-22better branching/sticky tag support, no branch commits yet though.Joris Vink
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-06-27fix diff output in a remote setup so our client does not freak out.Joris Vink
noticed and "yes, that's much shinier" by ckuethe.
2007-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
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-26Handle CVS/Entries and file timestamp correctly so we doJoris Vink
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@
2007-01-20sweep opencvs for missing rcs_translate_tag() return checks.Niall O'Higgins
2007-01-15replace old diffing mechanisms with the new fluffy RCS stuff,Joris Vink
okay niallo@
2007-01-14move things around in rcs_rev_getbuf() and rcs_rev_write_fd()Joris Vink
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@
2007-01-12major re-work of the RCS api. this results in 100x performance improvements ↵Niall O'Higgins
in some places and much 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.
2007-01-11strl* overload, use xasprintf().Xavier Santolaria
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@
2006-07-08Remove file mode argument from {cvs|rcs}_buf_write_stmp(). WeRay Lai
always set the temporary file to mode 600, which is already done by mkstemp(). OK joris@ and xsa@ over a month ago.
2006-07-07first part of opencvs remote, fairly useable on existing treesJoris Vink
although i advise against using it on real development trees for now. only a few commands work right so far: - commit - diff - status - log - update (partially working) if you feel like testing remote and run into bugs feel free to contact me, and please include a full trace (-t).
2006-07-01Indentation.Ray Lai
2006-06-19kill local and remote callback and just have one called fileproc.Joris Vink
we let the commands pass the correct function. all in preparation for remote.