summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/import.c
AgeCommit message (Collapse)Author
2009-06-27release storage after asprintf. ok sthen@Martynas Venckus
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-01-02Add format attributes to functions that use variable arguments andCan Erkin Acar
make the code -Wformat=2 clean. ok joris@ xsa@
2008-06-15open the RCS file descriptor with O_RDONLY, like all other code does.Joris Vink
ok tobias@
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-10properly inherit file permissions.Joris Vink
reported & tested by phessler@ input otto@ deraadt@ ok tobias@
2008-06-10Don't spawn editor for log message on server-side if no log message hasTobias Stoeckmann
been supplied as argument by client. ok joris
2008-06-10New trigger framework that allows us to run the required scriptsJoris Vink
defined in CVSROOT/commitinfo and CVSROOT/loginfo and so on. This enables the use of log_accum2 and all that other nice stuff we like. This was mostly written by Jonathan Armani with help from tobias@ and myself. ok tobias@
2008-06-08Handle commits on a per-directory basis instead handling all of them atTobias Stoeckmann
once in local setup. Also added '!' to reuse typed log message for all following directories. ok joris
2008-06-08allow for multiple release tags, noticed by tobias@Joris Vink
2008-06-08properly check the passed tags if they are valid before attemptingJoris Vink
the import.
2008-05-22expension -> expansionTobias Stoeckmann
ok joris, xsa (quite some time ago)
2008-05-22Error messages fixes; Stefan Sperling.Xavier Santolaria
2008-03-01import_get_rcsdiff() doesnt need cvs_noexec checks.Joris Vink
it only gets called from import_update() which handles the noexec stuff
2008-03-01allow dry-runs (-n) to work properly;Joris Vink
2008-02-27prevent file racesJoris Vink
ok tobias@
2008-02-20With latest buf cleanup, rcs_rev_getbuf won't return NULL anymore.Tobias Stoeckmann
OK joris@
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-04Added -k flag support for all commands which support it.Tobias Stoeckmann
OK joris@
2008-01-31remove dead and unreachable codeJoris Vink
ok tobias@ xsa@
2008-01-31Replaced the unused cvs_command variable cmd_req with cmd_flags, which statesTobias Stoeckmann
if the current command is supposed to use a working directory or if it is a repository-only command (as of now checkout -p, rtag, rlog). Makes the code simpler, easier to read and automagically fixes some issues we encountered with these commands (for example if a working directory exists, or "." operations are performed). OK joris@, niallo@
2008-01-10Our keyword expansion had a big flaw, due to this construction:Tobias Stoeckmann
if (!(mode & RCS_KWEXP_NONE)) RCS_KWEXP_NONE is defined to 0, so expansion happened always. Left shifted all RCS_KWEXP defines and looked carefully at hard-coded values throughout the code.
2008-01-10RCS files without head keyword mustn't segfault our implementation. OnlyTobias Stoeckmann
command that supports such files is "cvs status", therefore properly handle them in all other commands, too.
2007-09-22better branching/sticky tag support, no branch commits yet though.Joris Vink
2007-09-02Stick at GNU cvs behaviour by writing "Initial revision" in revision 1.1Tobias Stoeckmann
instead of custom log message (which gets written into 1.1.1.1). OK joris@
2007-08-30properly send our log message to the server using Argumentx, so weJoris Vink
no longer break when the log message has multiple lines. from Tobias Stoeckmann, thanks for doing my work!
2007-06-28Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK niallo@ ray@.
2007-06-01add support for local and remote branch checkout. for example,Niall O'Higgins
cvs co -rOPENBSD_3_0 works now. along the way, simplify and rationalise code and fix a few nits. ok joris@ xsa@ ray@
2007-02-22general includes cleanup sweep. ok joris@ niallo@Otto Moerbeek
2007-02-21Simplify cvs_buf_differ(). Also cvs_buf_differ(), a comparisonRay Lai
function, should not do any resource freeing. OK joris@.
2007-02-17cvs_path_cat() removal since we can now easily handle thatXavier Santolaria
functionality w/ xsnprintf(); Initial diff started by thib@. OK thib@ joris@.
2007-02-09remove the cvs_file_classify() `loud' argument, it was usedJoris Vink
in the old school days and serves no purpose what so ever now. otto@ mentioned this to me a while ago
2007-02-01add support for [-k mode]; tests/ok otto@.Xavier Santolaria
2007-01-31snprintf() -> xsnprintf()Xavier Santolaria
2007-01-20sweep opencvs for missing rcs_translate_tag() return checks.Niall O'Higgins
2007-01-19move cvs_import() proto to the correct place.Xavier Santolaria
2007-01-18import improvements:Joris Vink
- add support for remote import in opencvs client and server. - do not free already free'd buffers in import_update() - do not append a '\0' to the loaded file buffer, this was bad behaviour makes import work fine both locally and remotely.
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-13make import and init work again after the small breakageJoris Vink
we had with the rcs changes;
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-12complete binary support for opencvs,Joris Vink
adding/importing binary files now works too partially taken from openrcs
2007-01-11revert last commit after discussing w/ joris@; makes sense to removeXavier Santolaria
the tmp files once we'r done w/ them, not at the very end only..
2007-01-11no need to unlink() the tmp files here as they have already been addedXavier Santolaria
to the temp_files walklist anyway..
2007-01-07and lets make import work with the new logmsg code too!Joris Vink
2006-12-04snprintf() -> cvs_path_cat()Xavier Santolaria
2006-12-04- unlink tmp files when finished.Xavier Santolaria
- add missing xfree().
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-19kill local and remote callback and just have one called fileproc.Joris Vink
we let the commands pass the correct function. all in preparation for remote.
2006-06-16in preparation for the new remote code, proto.h becomes obsolete.Joris Vink