Paul Danko wrote:
I'm a newbie using CVS with PHP development. I created a CVS repository,
which contains two directories.
/CVSROOT/
/project/
where project has my code.
My problem is that CVS modifies the files in the /project/ folder. the
extension becomes *.php,v. I want to be able to checkout the code, check
it back in, and then essentially "refresh" my browser and see the
changes. In this case, the repository itself cannot be used by apache
(because the files are modified as mentioned previously), a checked out
version is required. this seems like extra steps.
1.) Check out my copy of the code
2.) Make changes to code
3.) Check the code back into cvs
4.) Checkout a copy of the current code to the web directory
5.) View the changes via the web.
Is this how it is typically done? Thanks for any help!
-Paul
I don't know how it is typically done, but I implemented a similar system months ago.
You need to edit one of the commit support files in CVSROOT, the loginfo file. (Note : when editing the loginfo file, check it out, edit it and commit it as you would a normal file in the repository. Don't edit it in place.)
(for more info on the commit support files, see https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_18.htm )
The loginfo file speficies a set of actions to be done when the commit is complete. If you add the line:
^project (date; cat; (sleep 2; cd /var/some/dir; cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1
This will cause commits to the projects directory to update the checked out version in /var/some/dir
(the above line was shamelessky taken from the manual in the link above, section C.3.5.2 :D)
Of course you need to take of permissions issues. Ensure that the user cvs is running in CAN write to /var/some/dir.
HTH!
--- ramil
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php