summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
AgeCommit message (Collapse)Author
2007-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
2007-02-19Fix const inconsistencies, void pointer artithmetic and a few otherOtto Moerbeek
things. now gcc -Wall and lint are more happy. ok joris@ xsa@
2007-02-04Use the right HEADNAME. Sometimes compiler warnings should not beOtto Moerbeek
ignored. ok xsa@ joris@
2007-02-01When writing an rcs file, create the temp file next to the targetOtto Moerbeek
file and then rename. Avoids inter-filesystem copy and fixes a potential rcs file truncation when the target fileystem becomes full. While there, use fchmod instead of chmod. ok xsa@ joris@
2007-01-26more fixe size buffers on the stack. ok xsa@ joris@Otto Moerbeek
2007-01-26- support [-k mode] for the add commandXavier Santolaria
- do not let the file keyword expension options (-k) disappear from the Entries file when doing a commit/update/checkout - be sure the expension mode gets written to the RCS file when a file is added/committed in the first place problems raised by otto@; tests/ok otto@ and joris@.
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-25plug a leak if multiple expansions are done on a single line. okOtto Moerbeek
niallo@
2007-01-25plug a memleak in keyword expansion.Niall O'Higgins
ok joris@
2007-01-16sanitize what kind of symbols we can have in symbol names,Joris Vink
tested & found brad@
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-13nuke the the very evil rcs_getrev() stuffJoris Vink
discussed with niallo@
2007-01-13the memleak i thought i had fixed was in fact NOT a leak at allJoris Vink
and caused opencvs to crash so revert, oops?
2007-01-13- better error messagesJoris Vink
- correclty use cvs_tagname, so that the tag from $CVSROOT/config will actually be expanded as a keyword.
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-12do not leak memory from rcs_head_get()Joris Vink
ok niallo@
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-12-21- plug memory leak in rcs_parse_delta()Niall O'Higgins
ok joris@ ray@
2006-12-21- plug memory leak in rcs_translate_tag()Niall O'Higgins
ok joris@ ray@
2006-12-21- plug memory leak in rcs_patch_lines()Niall O'Higgins
ok joris@ ray@
2006-12-04- fix crash when doing keyword expansion of zero-length buffers.Niall O'Higgins
ok ray@
2006-08-23pull in latest change from openrcs:Joris Vink
Add missing checks for EOF when parsing rcs file sections. by millert@
2006-08-02Sync CVS's rcs_expand_keywords() and rcs_kwexp_buf() with RCS.Ray Lai
OK niallo@
2006-07-30Sync some whitespace changes from rcs. No binary change.Ray Lai
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-09handle `cvs tag -F'; input && OK joris@.Xavier Santolaria
2006-06-06add support for the -D option of update,Joris Vink
-D allows you to update a file to matching a specified date: opencvs up -D "1 hour ago" foobar will take the first matching revision that was commited 1 hour ago.
2006-06-04lets not stop looking for a branch if the first oneJoris Vink
on the branches list does not match the one we are looking for, it might be further down.
2006-06-04sprinkle -n voodoo over the add, commit and import commands.Joris Vink
2006-06-01major rewrite of some rcs parsing stuff:Joris Vink
- rework rcs_getrev() to correctly support branches - rework rcs_translate_tag() to correctly translate given symbols or branches into their matching revisions - rework rcs_rev_add() to correctly update its 'next' pointers and insert the new revision in the correct place on the list. - rework rcs_head_get() to return the latest revision on the default branch if it has been set or the normal HEAD revision otherwise. - no longer access the rf_head member of the RCSFILE struct manually, use the rcs_head_get() function which correctly returns the HEAD revision, there might be a default branch that has to be used. - for now, when commiting a new revision reset the default branch.
2006-05-31add support for the export command.Joris Vink
export does exactly the same as checkout except it does not create any administrative (CVS/) directories.
2006-05-31have rcs_translate_tag translate branches too, whichJoris Vink
allows us to completely use branches for diffing, logging, updating, etc.. more branches support coming up!
2006-05-30look inside the Attic if a specified RCS file cannot be foundJoris Vink
in the normal repository, and a way to identify an RCS file in the Attic in the RCSFILE struct. will come in handy later on.
2006-05-29add rcs_translate_tag which will translate a specifiedJoris Vink
revision or symbol given to us on the command line into the matching revision in the RCS file (if any);
2006-05-28add rf_dead field to RCSFILE which can tell usJoris Vink
if an RCSFILE is dead, will come in usefull later in commands.
2006-05-27basic support for CVSROOT/config - only supporting the 'tag' andJoris Vink
'umask' keyword right now.
2006-05-27correctly expand keywords when checking out filesJoris Vink
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-05-01- fix a case in rcs_getrev() handling of branches where variant was not beingNiall O'Higgins
increased and thus no progress could be made in the loop. bug noticed in rcsdiff(1) by sturm@ ok joris@
2006-04-25check rcs_head_set() return value.Xavier Santolaria
2006-04-14spacingTheo de Raadt
2006-04-14remove a metric buttload of excessive ()Theo de Raadt
no binary change; ok ray
2006-04-13Change rcs_parse_init() to return void, since it always returned 0.Ray Lai
Remove unused variables found by lint. Some parts OK xsa@, ``throw it in :)'' joris@
2006-04-13add support for the openrcs -o'range' option.Joris Vink
-o allows users to delete revisions in the specified RCS files. example: rcs -o1.4:1.6 foo deletes revisions 1.4 - 1.6 rcs -o1.3 foo deletes revision 1.3 joint work with niallo@ okay niallo@
2006-04-13fix -z option for openrcs, this was broken by xsaJoris Vink
when he yanked the code out of rcs.c and placed it in rcstime.c. struct tm ltb, *tb; tb = &ltb; return (tb); isn't really the most perfect idiom to return a value to the caller, now is it? as a bonus -z for rlog now works too. okay niallo@
2006-04-12Better match GNU behavior for rcs -l and rcs -u.Ray Lai
Save 2 bytes of newlines. OK joris@
2006-04-10rcs_kflag_usage() is not used by usr.bin/rcs; OK joris@.Xavier Santolaria
2006-04-10change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.Xavier Santolaria
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@