summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/diff3.c
AgeCommit message (Collapse)Author
2010-07-23Reduce variable/function name and whitespace differences betweenRay Lai
cvs/rcs. OK xsa zinovik
2010-07-23Rename a bunch of variables and functions, removing the cvs_/rcs_Ray Lai
prefixes to reduce differences between cvs and rcs files. "yes!" nicm
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
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
2008-03-09unused varJoris Vink
2008-03-08add checkout/update -j support.Joris Vink
still has some rough edges.
2008-03-08correct usage of lseek(2);Joris Vink
2008-03-01when reopening the file pass the proper mode and reopen it usingJoris Vink
O_RDWR instead of O_WRONLY so that when we are in server mode we do not screw up in cvs_remote_send_file().
2008-02-29handle file permissions and owners properly.Joris Vink
matches what gnu cvs does. fixes the fact that we couldnt update group writable files. problem report & diff testing by David Crawshaw.
2008-02-28nobody needs weird debug messagesJoris Vink
2008-02-27prevent file racesJoris Vink
ok tobias@
2008-02-23reset overlapcnt at each cvs_merge_file() call so that files thatJoris Vink
are being merged that have no conflicts will not report the previous conflicts that might have been found.
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.
2007-09-17Imported atomicio interface.Tobias Stoeckmann
Requested by ray@, OK joris@
2007-09-10Proper use of fseek/fseeko macros.Tobias Stoeckmann
OK joris@, otto@
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-05-29Since xrealloc dies on failure it is safe to directly assign to theRay Lai
original pointer. Theo agrees, and so does the rest of the tree (ssh, etc. all do this already). Saves a bunch of variables and assignments. OK niallo@
2007-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
2007-01-31snprintf() -> xsnprintf()Xavier Santolaria
2007-01-28add merging support in both local and remote sides.Joris Vink
tested by many, thanks.
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-12complete binary support for opencvs,Joris Vink
adding/importing binary files now works too partially taken from openrcs
2007-01-11rework opencvs so that we can deal with binary files. previously we assumed ↵Niall O'Higgins
all files were ascii, which broke things in real-world usage. now a checkout of src should work, albeit using lots of memory and cpu. fixing this is the next step. testing by many. ok & some input joris@
2006-11-10sync with usr.bin/rcs/diff3.cXavier Santolaria
2006-11-09respect TMPDIR here too, changes pulled in from usr.bin/rcs.Xavier Santolaria
2006-10-24Check that string length != 0 before setting buf[strlen(buf) - 1].Ray Lai
OK 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-06-14add cvs_buf_load_fd() which does the same as cvs_buf_load()Joris Vink
except it takes a decriptor as argument instead of a path. modified cvs_buf_load() to open the descriptor then pass it to cvs_buf_load_fd(). change all the calls to cvs_buf_load() that have a descriptor open for the path to cvs_buf_load_fd() to prevent races.
2006-05-27commit the new opencvs code, i have been hacking onJoris Vink
this for the past 2 weeks now and it should go in at the start of the hackathon so others can help out. this code is a lot safer, smarter, faster and best of all it is actually doing what it is suppose to do! basic checkout, update, status, diff and commit are working in local mode only. there is no support for any remote setups now.
2006-04-14more nasty spaces go bye byeTheo de Raadt
2006-04-05Use variable names for sizeof, remove casts in front of xmalloc,Ray Lai
use xcalloc and xstrdup where appropriate, and other stuff. OK joris@
2006-03-28Today is Integer Overflow Prevention Day:Ray Lai
- Sync xmalloc.? with ssh versions. - Change all xrealloc() calls to new API. ``I really like this.'' niallo@
2006-03-25Correct integer types, remove unused arguments, non-portable bitshiftsRay Lai
changed to division, KNF, replace unreachable code with goto fail, et cetera. Found by lint. The free() -> xfree() as well. OK niallo@
2006-03-16kill two unused variables.Xavier Santolaria
2006-03-14add an argument to cvs_diff3() to be able to handle verbosity ofXavier Santolaria
commands; fixes rcsmerge -q behaviour. OK niallo@ ray@.
2006-03-06adapt informative message if we are sending output to stdout.Xavier Santolaria
2006-03-06if the submitted rev(s) is/are the same as the head rev, skip the processXavier Santolaria
for the specified file. Fix some error messages while there. OK joris@
2006-03-05oops, forgot the diff3.c portion of this diff:Niall O'Higgins
fatal() instead of returning -1 on failure in patch functions ed_patch_lines() and rcs_patch_lines(). this can avoid segfault in certain circumstances. From: Ray Lai <ray@cyth.net> discussed with xsa@ and joris@
2006-02-26out-of-bounds access and correct some printf while here;Xavier Santolaria
2006-01-23snprintf() -> strlcpy()/strlcat(); OK niallo@.Xavier Santolaria
2006-01-02#include's cleanup; ok joris@ niallo@.Xavier Santolaria
2005-12-30knfReyk Floeter
2005-12-24remove useless cvs_buf_alloc() failure checks;Joris Vink
2005-12-20cvs_buf_putc() and cvs_buf_write_*() functions cannot fail anymore;Xavier Santolaria
2005-12-10switch to xmalloc stuff, me and xsa@ agreed on this a longJoris Vink
time ago, but we were being held back by jfb. too bad for him. next step is to use fatal() through out the code for unrecoverable errors instead of trying to be all nice and fluffy and reach main() again. ok niallo@ and xsa@
2005-12-03add very basic support for the following stuff:Joris Vink
- checkout in local mode (example: /cvs) - update in local and server mode (example: /cvs and user@host:/cvs) - import in local and server mode (example: /cvs and user@host:/cvs) what remains to be done: - not all options are supported yet, and update cannot pick up newly added files yet. these things are pending and will be commited real soon. - checkout only works locally right now. - fix rcs parsing code so that we don't fucking hog 100% cpu on really BIG BIG BIG ass trees. mainly tested by pedro@ and myself, thanks a lot pedro! "go for it" niallo@
2005-11-08missing casts;Xavier Santolaria
2005-10-26diff3_conflicts cleanup; joris okXavier Santolaria
2005-10-23better output;Joris Vink