Re: How to use SVN + PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edmund Hertle wrote:
Hey,
I'm thinking about implementing Subversion to an existing php project for
obvious reasons.

But I have some trouble when thinking about the usage.

there are lots of ways of using svn and I'm sure you'll get different opinions.. personally I always create a script to deploy to live.. just a little bash script that prompts me for the version number to use, then it scp's the files over in a second.

as for the development process; normally I develop and test locally, then when happy scp from svn to staging site, then when clients happy scp to live site (with scripts, and version tagging in svn).


Next problem:
While writing new code there are many "small bugs" like used an array
instead of an string or other way round forgotten parameters and so on.
Usually there are quite some file transfers until some piece of code works
quite well. But with the method above all these versions would end up being
in the rep and kind of "polluting" it.
To solve this I thought about just creating a branch with every work cycle
(so after updating until committing a working version) and than while
committing also merging it back with current trunk/branch...

well the idea of svn is that should you find a problem you either rollback the file(s) to the good version (not rollback the whole site) or you commit updated files with the fix, then redeploy. No need to branch or such like.

maybe more importantly.. you shouldn't really be getting to production live with these errors (you always will at some point) - perhaps you want to look at unit testing, and even continuous integration/building while you're there.

ps: pdt-eclipse is great, you can integrate it right in with svn for handy diff's, commits, updates etc (and svn in with bugzilla, mylyn loads more..)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux