summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.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-03-30kill rp_lines, we do not need it when parsing an RCS file.Joris Vink
incendently, commit made using opencvs entirely. with permission from deraadt@
2009-03-25prevent a very difficult to reach, but possible use after free.Joris Vink
ok tobias@
2009-03-22Properly free allocated memory in error case.Tobias Stoeckmann
ok joris
2009-02-21Properly convert dates between timezones before comparison.Tobias Stoeckmann
ok joris
2009-02-18fix off by one character when constructing $Mdocdate$.Joris Vink
problem found by todd@, ok sthen@
2009-02-15add our temporary RCS file to our temp_files worklist in caseJoris Vink
for some reason we get interrupted before calling rename(). we hate leaving behind temporary files.
2009-01-02Add format attributes to functions that use variable arguments andCan Erkin Acar
make the code -Wformat=2 clean. ok joris@ xsa@
2008-11-09Removed unneeded conversion from RCSNUM to string in rcs_rev_setlog.Tobias Stoeckmann
oki joris@
2008-09-17try getlogin() to get the real username when comitting files as root.Reyk Floeter
this gives better information in log messages when the user logged in with a different uid and used sudo or su to become root. matches the behaviour of gcvs except that we don't fallback to LOGNAME or USER since getlogin() should not lie. ok tobias@
2008-09-12Plugged two memory leaks which could be encountered while using -r argumentTobias Stoeckmann
with various CVS commands. "seems to make sense" xsa@
2008-09-12Be very conservative about state changes with "admin -s". With GNU CVSTobias Stoeckmann
and current OpenCVS code it's possible to change a state in a way that cannot be fixed with another admin call. No objections xsa@
2008-06-26plug a memleak in rcs_rev_getlines() - initially noticed & diff byJoris Vink
Igor Zinovik - but fixed in a better way by myself. ok tobias@
2008-06-15if we are using RCS_PARSE_FULLY we can close the RCS file descriptorJoris Vink
as soon as we are done parsing, since we no longer need it for anything.
2008-06-15Support the addition of new files in branches.Tobias Stoeckmann
ok joris
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-14Added support for sticky date set in CVS/Tag and CVS/Entries per directory.Tobias Stoeckmann
ok joris
2008-06-14don't always re-open the same CVS/Entries file, instead keep theJoris Vink
last opened CVS/Entries around to operate on and close it whenever we switch directory. gives us a small performance boost, obviously. while doing this, switch the way we write revisions to disk by using fwrite(3) so stuff can get written to disk in chunks instead of writing everything line by line, another win. with help from otto@ ok tobias@
2008-06-14Fixed wrong function name in fatal call.Tobias Stoeckmann
2008-06-12we should be able to handle symbol names that are also RCS tokens,Joris Vink
gnu cvs supports this and we should too really. allows opencvs to properly checkout netbsd trees. spotted & tested by rivo nurges ok tobias@
2008-06-12completely kill the need for TMP_DIR when running checkout,Joris Vink
which gives us better performance among other things. this is however disabled in a few cases: 1) whenever you run checkout over an existing tree (which acts as update) 2) whenever you specify -d or a module alias we're planning on enabling this behaviour for case 2 in the future. anoncvs sysadmins now love us even more. ok tobias@
2008-06-10properly inherit file permissions.Joris Vink
reported & tested by phessler@ input otto@ deraadt@ ok tobias@
2008-06-10more characters are allowed in the symbol lists, found by tobias@Joris Vink
2008-06-10We have a cvs_buf_puts implementation now, also use cvs_buf_putc insteadTobias Stoeckmann
of cvs_buf_append where appropiate. ok joris
2008-06-08rcs_translate_tag mustn't fatal() if it cannot resolve a tag. Breaks '-f'Tobias Stoeckmann
in (r)annotate and (r)diff. ok joris
2008-05-22fix updating to tags pointing at branch revisions;Joris Vink
from Neels Janosch Hofmeyr and Stefan Sperling
2008-05-17Full support of branches added. We lacked proper support of multipleTobias Stoeckmann
branch entry points in one revision as well as branches which started from other branches. ok joris
2008-05-11Memory leak in rcs_delta_stats plugged.Tobias Stoeckmann
ok joris
2008-03-13properly initialize variablesJoris Vink
2008-03-09Fix segmentation fault when running checkout -p on a file withoutTobias Stoeckmann
specified head revision. ok joris
2008-03-08better -j supportJoris Vink
2008-03-08Set umask (and cvs_umask) to system's umask in local and client mode.Tobias Stoeckmann
Also zap umask(0);umask(mask); calls, we have cvs_umask for this. ok joris
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-02rcs_errno is gone: zap rcs_errstr() and rcs_errstrs[] as well.Tobias Stoeckmann
ok joris
2008-03-01spacingTheo de Raadt
2008-03-01goodbye rcs_errno - we didnt use you and you wont be missedJoris Vink
2008-02-28RCS files can have a default expansion mode, keep this in mind forTobias Stoeckmann
update -A and -k. spotted by and ok joris
2008-02-28kill way out of date stuffJoris Vink
2008-02-27prevent file racesJoris Vink
ok tobias@
2008-02-20make sure we use the default branch (if available)Joris Vink
in rcs_translate_tag() if we are looking for a revision on the trunk. fixes inconsistancy with gnu cvs. problem noticed by brad@
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-10properly initialize cvs_specified_date so we dont end up withJoris Vink
random stuff going on
2008-02-09fix error msg;Joris Vink
2008-02-09Get in initial support for checkout -D. Works fine with -r support rightTobias Stoeckmann
now. OK joris@
2008-02-03Do not unify this "-fr UNKNOWN" handling, it breaks commands which haveTobias Stoeckmann
to work fine and just ignore files which don't have requested symbol. Spotted by joris@.
2008-02-02Although this doesn't comply to common sense, it complies to GNU cvs. AllTobias Stoeckmann
commands which supply -f and -r have this weirdness: an unknown symbol leads to fatal instead of head revision. OK xsa@
2008-01-31Handle magic branch numbers in OpenCVS as well.Tobias Stoeckmann
OK joris@
2008-01-31in some cases we did not return a copy of the resulting RCSNUMJoris Vink
towards the caller, which expects a copy (and frees it when done). ok tobias@