summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/util.c
AgeCommit message (Collapse)Author
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 memleak in keyword expansion.Niall O'Higgins
ok joris@
2007-01-20Add missing check for fgets return value inThordur I. Bjornsson
cvs_get_repository_name(). OK joris@
2007-01-20sweep opencvs for missing rcs_translate_tag() return checks.Niall O'Higgins
2007-01-19another place to check for DT_UNKNOWN for d_type for afs/nfsTodd T. Fries
2007-01-17add support for remote checkout in both our client and server,Joris Vink
with this the last real dependency to actually be able to use opencvs in a remote setup has been added. based upon an initial diff from xsa@ 'kay niallo@
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@
2007-01-07zap-o-matic 2007:Joris Vink
- zap unused argument to cvs_exec()
2007-01-03bring back cvs_yesno() as is it going to be used pretty soon now.Xavier Santolaria
2006-12-05unlink(2) sets errno, use it for error message.Xavier Santolaria
2006-12-05rmdir(2) sets errno, use it for error message.Xavier Santolaria
2006-11-28snprintf() -> cvs_path_cat()Xavier Santolaria
2006-10-11check fgets(3) return value and also fix aThordur I. Bjornsson
buf[strlen(buf) - 1] = something; misuse. ok niallo@, cloder@
2006-07-09more straightforward trace (-t) output, too much is just too noisy.Joris Vink
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-06-14simplify cvs_hack_time() and the way it is called;Joris Vink
2006-06-14handle existing CVS/Tag file when adding new directories. OK joris@.Xavier Santolaria
2006-06-07a bug in cvs_mkpath() prevented to create the CVS admin directory andReyk Floeter
files under some special circumstances. remove a bogus stat() check to fix it. ok joris@
2006-05-30make sure cvs_get_repository_path returns a valid repo nameJoris Vink
for the import command.
2006-05-30hello import, only works for non-existing repositories right now,Joris Vink
but work is in progress for importing stuff into existing repositories.
2006-05-29make the log command use rcs_translate_tagJoris Vink
2006-05-28add code which allows us to select revisions based uponJoris Vink
a string given by the user on the command line, much like rcs_revision_select in OpenRCS. this will be usefull for some commands.
2006-05-28several fixes to the file api:Joris Vink
- default to CVS_FILE when something is totally unknown - cvs_get_repository_path() now returns the full repository path for the given argument. - cvs_get_repository_name() returns the contents of CVS/Repository to the caller. - allow command callbacks to specify if our recursion code needs to skip the directory or not. - when checking for a admin directory, make sure it is in fact a directory. if it is not we dont want to recurse inside.
2006-05-27boogie cvs_yesno() down the removal hatch, it is not used.Joris 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-04-14remove a metric buttload of excessive ()Theo de Raadt
no binary change; ok ray
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-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-28xmalloc(num * size) -> xcalloc(num, size)Ray Lai
asprintf -> xasprintf Remove asprintf check, which was non-portable anyway. ``okidoki'' 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-27Plug a memory leak for all cvs_strsplit call sites; ok xsa@Patrick Latifi
2006-03-17- Lint says cvs_hacktime() is not used in rcs, so move it into !RCSPROG.Niall O'Higgins
ok xsa@
2006-03-17rlog_strsplit() -> cvs_strsplit() and move it to util.c so it can be reusedXavier Santolaria
by `cvs log' and some other RCS utilities. "Looks good" ray@.
2006-03-15- add util.h, reorganising a bunch of things and exposing cvs_yesno()Niall O'Higgins
function to be used by rcs.
2006-01-27cvs_mkadmin() cannot return < 0 anymore;Xavier Santolaria
2006-01-25strings cleanup; OK niallo@.Xavier Santolaria
2006-01-02rename variable to fix shadow warning;Xavier Santolaria
2006-01-02#include's cleanup; ok joris@ niallo@.Xavier Santolaria
2006-01-01more code cleanup;Joris Vink
ok xsa@ i'm commiting only hours after newyear, ah the joys of being a true geek.
2005-12-30more code cleanup, ok niallo@ and xsa@Joris Vink
2005-12-24add an argument to cvs_chdir() which enables or not the removalXavier Santolaria
of the directory we just chdir'd to. Useful when the function fails especially for the server mode and its temporary directory. This way it's not left behind on exit. ok joris@.
2005-12-24remove useless cvs_buf_alloc() failure checks;Joris Vink
2005-12-22cvs_chdir() cannot fail anymore;Xavier Santolaria
2005-12-22another fatal() round;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-03fix date handling in opencvs, this was broken since the very start.Joris Vink
now, when you checkout a tree with gnu cvs, opencvs no longer sees all the files as modified, and visa versa. this actually makes gnu cvs and opencvs dance together in working copies.
2005-12-03nuke unused vars;Joris Vink
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-10-30nuke trailing whitespaces;Xavier Santolaria
2005-10-22diff3 support, needed for merging files together;Joris Vink
"go for it" niallo@