summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
AgeCommit message (Collapse)Author
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@
2006-04-02some characters are in fact allowed in symbol names, don't freakJoris Vink
out when we encounter them, but handle them correctly. fixes an issue i ran into when running opencvs update on my local tree;
2006-04-01don't use mode_t with va_arg(), use int instead and cast it later toJoris Vink
mode_t. doing it the other way around isn't portable as mode_t may vary from int on some systems to short on others. noticed by deraadt@
2006-03-30hmm, let's not use fatal() when we cannot find a branch instead return NULLJoris Vink
so the caller can identify the branch is not there and take correct action.
2006-03-30zap unused variable, niallo@ noticedJoris Vink
2006-03-30first part of supporting branches in openrcs. right now we can onlyJoris Vink
check them out. commit is not working yet, but will be soon. tested by myself and ray@ okay ray@
2006-03-29Yet more lint:Ray Lai
- Explicitly test for -1 from read(2) and write(2). - Change negative parameters to 0 for rcsnum_cmp(). (I think xsa@ had a patch for this earlier.) - Remove unused variables. - Changed return types to void if we only return one value. - Fix possible one-character truncation in rcs_deltatext_set(). - Use memcpy() to copy u_char arrays. - Use ptrdiff_t to hold pointer differences. - int -> size_t for sizeof/strlen ``looks fine'' xsa@
2006-03-28Finally. Basically, rcs_parse_delta() doesn't understand thatRay Lai
sometimes there are no revisions, and that it is not an error. This makes it so that if rcs_parse_delta is called and the only thing that is found is the description, we know that there are no more revisions. Fixes ``rcs -i file; rlog file''. OK xsa@
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-27- properly implement GNU file modes. basically, checkout will inheritNiall O'Higgins
permissions from rcs file and initial checkin will inherit permissions from working file. problem spotted by uwe@ ok ray@ xsa@
2006-03-27rcs_growbuf() cleanup; OK ray@.Xavier Santolaria
2006-03-27rcs_comment_set() will never return non-zero; change its return type to void.Xavier Santolaria
OK ray@.
2006-03-27rcs_desc_set() will never return non-zero; change its return type to void.Xavier Santolaria
OK niallo@.
2006-03-26rcs_parse_desc() cleanup; OK ray@.Xavier Santolaria
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-24change rcs_parse_deltas() and rcs_parse_deltatexts() return valueXavier Santolaria
to void as they never return non-zero. OK ray@.
2006-03-23use fatal() in rcs_lock_setmode(); OK ray@.Xavier Santolaria
2006-03-15remove some bizzare idioms; ok rayTheo de Raadt
2006-03-11- implement GNU-compatible handling of revisions specified as singleNiall O'Higgins
digits. e.g. ci -l4 or ci -u5 will work like GNU now. ok joris@