summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/checkout.c
AgeCommit message (Collapse)Author
2009-06-21Use correct synopses for checkout and export when an invalid -k optionStuart Henderson
is specified. From Dawe in user/6177.
2009-04-06make sure we handle allowed options in cvs_export() insteadJoris Vink
of ignoring them, even if they are just stubs. unbreaks export with gnu cvs clients.
2009-03-27make sure that when we try to send a Set-sticky to the client,Joris Vink
we only do so if the file we're checking out was not supplied on the command-line. Otherwise we'll end up setting CVS/Tag for the entire directory instead of slapping a sticky tag only on the file supplied.
2009-03-25switch our file and directory lists to RB trees (see tree(3)),Joris Vink
so we can benefit from faster lookup times while recursing.
2009-03-18be carefull when trying to access cf->file_rcs in cvs_checkout_file()Joris Vink
as it could be NULL under certain conditions.
2009-02-23we no longer push out Set-sticky to the client when writingJoris Vink
our Tag file on the server or in cvs_mkpath(), this caused problems for the "fast checkout" mechanism when a tag was supplied. instead, write out any directory sticky tag when we are checking out a file in that directory, this way we can use our "fast checkout" mechanism (no /tmp required) even for -r and -d without breaking working copies because they were missing CVS/Tag files. "looks good" tobias@
2009-02-21use FILE_ON_DISK flags when we need to verify if a fileJoris Vink
exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
2009-02-21use file_flags for 2 more reasons:Joris Vink
- mark a file as being inside the Attic/ - mark a file as existing in the working copy (both in local and remote mode) this way we no longer will need to check if cf->fd == -1 and think about wether or not we are in local or remote mode.
2009-01-28enable -d for the export command.Pierre-Yves Ritschard
ok joris@
2008-07-08use cf->fd in cvs_remote_sendfile() instead of using a localJoris Vink
variable that is only used once, which is in this case.
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-12Fixed a memory leak in export noticed by joris.Tobias Stoeckmann
ok joris
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-11always enter cvs_update_leavedir()Joris Vink
2008-06-11Avoid possible NULL pointer dereferences by using reentrant versionsTobias Stoeckmann
of time functions. ok joris
2008-06-10properly inherit file permissions.Joris Vink
reported & tested by phessler@ input otto@ deraadt@ ok tobias@
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-08simplification from igorJoris Vink
2008-06-08Avoid memory leaks in directory tag handling by always allocating andTobias Stoeckmann
always freeing dirtag. ok joris
2008-05-22expension -> expansionTobias Stoeckmann
ok joris, xsa (quite some time ago)
2008-03-09proper repository locking:Joris Vink
- all read operations now look for a lock, and wait if present but never try to lock the tree themselfs anymore. - all write operations lock the tree where needed. - commit locks all relevant directories before even attempting to start.
2008-03-08add checkout/update -j support.Joris Vink
still has some rough edges.
2008-02-29handle file permissions and owners properly.Joris Vink
matches what gnu cvs does. fixes the fact that we couldnt update group writable files. problem report & diff testing by David Crawshaw.
2008-02-27prevent file racesJoris Vink
ok tobias@
2008-02-24Properly handle return value of dirname().Tobias Stoeckmann
OK joris@
2008-02-10+ #define CVS_DATE_FMT "%Y.%m.%d.%H.%M.%S"Xavier Santolaria
...and use it.
2008-02-10Respond with "Updated" instead of "Checked-in" on server-side if a clientTobias Stoeckmann
committed files, so keywords are expanded properly. On client-side, we have to be careful about Directory ./ when it comes to commits, so add a test for CVS_OP_COMMIT. OK and help from joris@
2008-02-10properly initialize cvs_specified_date so we dont end up withJoris Vink
random stuff going on
2008-02-09Introduce cvs_ent_line_str() - formats CVS/Entries lines.Xavier Santolaria
OK tobias@.
2008-02-09Support for checkout -D extended:Tobias Stoeckmann
Properly write CVS/Tag and CVS/Entries on various combinations of -r and -D. OK joris@
2008-02-09remote improvements:Joris Vink
- make sure the client creates the correct CVS/Repository when running checkout if there was no -d targetdir specified. - allow -D to work remotely for both checkout and update.
2008-02-09Get in proper support for checkout/update -A when it comes to keywordTobias Stoeckmann
expansion options. OK joris@
2008-02-09Get in initial support for checkout -D. Works fine with -r support rightTobias Stoeckmann
now. OK joris@
2008-02-07exit() needs stdlib.hXavier Santolaria
2008-02-06lets do co -c as well (list available modules) and do it in 1/6th of theJoris Vink
lines GNU cvs does it in, without actually fucking up on bad lines, like gnucvs. ok tobias@
2008-02-04CVSROOT/modules:Joris Vink
correct -i and -o usage -i runs the program specified on commit -o runs the program specified on checkout
2008-02-04implement -n for checkout:Joris Vink
"Do not execute programs listed in the CVSROOT/modules file." ok tobias@, pleasekeepthingssortedktnx xsa@
2008-02-04more CVSROOT/modules stuff:Joris Vink
- support for -i flag: Run "prog" on "cvs commit" from top-level of module. - fix some memory leaks in modules.c - pass the line number from cvs_read_config() towards the callbacks so its easier to print out where it's going wrong, if it ever does. OK tobias@
2008-02-04Added -k flag support for all commands which support it.Tobias Stoeckmann
OK joris@
2008-02-03shuffle some stuff around so we dont end up doing the same thingsJoris Vink
twice in cvs_module_lookup() and checkout_check_directory(); allow single files to be ignored with ! as well;
2008-02-03more CVSROOT/module stuff:Joris Vink
- allow more then 1 module to be specified per definition - respect the "!" sign which means: "hey ignore this dir when checking out" - non alias definitions can now contain files ok tobias@
2008-02-03dont forget to send the -d flag to our server as well if itJoris Vink
was specified;
2008-02-03respect any -l option that might have been set in CVSROOT/modules;Joris Vink
2008-02-03with the recent changes for CVSROOT/modules we can now support theJoris Vink
basics of checkout -d. Multiple modules with -d is still "not supported". example: $ opencvs -d /cvs co -d kernel_source_3_0 -rOPENBSD_3_0 ksrc yes, it rocks. ok tobias@
2008-02-03better CVSROOT/module support, includes remote support and modulesJoris Vink
that are not aliases (-a); OK tobias@
2008-02-03cvs_update_leavedir is only useful if dirs have to be pruned.Tobias Stoeckmann
OK joris@
2008-02-03(f)utimes takes sys/time.hTobias Stoeckmann
2008-02-02initial CVSROOT/modules support, only does aliases at the moment (-a).Joris Vink
"modules.c, hurray!" xsa@, ok tobias@