summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/util.c
AgeCommit message (Collapse)Author
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@
2005-10-07knf and spacing, ok joris@Reyk Floeter
2005-09-15check in cvs_mkadmin() wether we need to create or not theXavier Santolaria
CVS/Tag file. Sync the rest of the code accordingly; OK joris@.
2005-09-05add new functions: cvs_write_tagfile() and cvs_parse_tagfile(),Xavier Santolaria
write and parse a CVS/Tag file. Ok joris@.
2005-08-17trailing whitespaces ...Xavier Santolaria
2005-08-12add cvs_rename() function; ok jfbXavier Santolaria
2005-07-30o remove a call to cvs_ent_open() from cvs_file_create(),Moritz Jodeit
since cvs_mkadmin() already does this for us. o don't deref NULL ptr when cvs_ent_open() fails. o fix format string in cvs_log(). ok joris@
2005-07-27check == -1 not != 0 for stat() return value, for consistency sake!Xavier Santolaria
"OK big time" jfb@.
2005-07-27make cvs_rmdir() handle global -n and -t options; ok joris@.Xavier Santolaria
2005-07-27rename cvs_remove_dir() to cvs_rmdir() because it might be confusingXavier Santolaria
with the `remove' command local functions. ok joris@.
2005-07-26no need to complain that we cannot remove the file in cvs_unlink()Joris Vink
if it does not exist. "commit it" xsa@
2005-07-25minor KNF;Xavier Santolaria
2005-07-25KNF;Xavier Santolaria
2005-07-24use cvs_unlink() here too;Xavier Santolaria