Jump to content
Sign in to follow this  
DeX

How do I set up Subversion without requiring commits to test?

Recommended Posts

Right now I do all my PHP edits in NetBeans and when I save a file, it automatically uploads it to the development server so I can test. If everything tests correctly, I copy it to production via FTP.

 

I would like to start using Subversion but don't want to lose the convenience of the automatic uploads when saving the file. I would like this process:

- saving in Netbeans automatically uploads file to development server for testing

- if all testing works out, I commit the changes

- if I have done enough commits for a new version release, wrap everything up to be copied to production. The previous company I worked at used tags for this and each tag was named with a version number.

 

I make such frequent small edits to make something work that I would hate to have to go to the command line and commit with a message in order to get something up to the development server in order to test. Does it already work like this or am I using it outside the normal usage?

 

If I do this, where would I hold my repository? In the actual /var/www/website directory with all the development files? Outside that directory somewhere?

 

Thanks a lot.

Share this post


Link to post
Share on other sites

Subversion? What year is this? Git is where it's at.

 

Netbeans? The "uploads file" and "commit the changes" things are two separate mechanisms: you can save a file (and thus automatically upload it, if your project is set up correctly) without having to make a commit for it.

 

The svn directory can go anywhere as long as you aren't uploading it to the site - because then you'd be constantly uploading lots of files that don't need to be.

Share this post


Link to post
Share on other sites

Makes sense, I've been doing a lot of research and it appears I can host my repository in a completely separate folder from my development server web directory.

How is GIT better? Back to more research.....

Share this post


Link to post
Share on other sites

This topic has been discussed to death. Spend 5 minutes on Google, look up the different version control systems, and I'm sure you'll find what you need.

 

Subversion is a centralized system, git and Mercurial are distributed systems. Distributed means everybody has a fully functional local repository which may be synchronized with any other repository of the same project. This provides a lot more flexibility: You can work offline, you can push your changes to a central server, you can exchange them with your coworkers.

Share this post


Link to post
Share on other sites

Been checking it out all day, looks like GIT has the advantage of being able to make commits offline since every user has a local repository. Then you have a separate set of commit commands where you can commit your local repository up to the main server copy. This introduces increased complexity though, so many beginner or single user systems are going to work better with Subversion.

I've decided to stick with Subversion.

Share this post


Link to post
Share on other sites

This introduces increased complexity though, so many beginner or single user systems are going to work better with Subversion.

 

I've worked with all three version control systems, and I think this is BS.

 

You're free to use any tool you want, but if you like to make an intelligent decision, I recommend you do some more research and actually try out the different options.

Share this post


Link to post
Share on other sites

Yeah, there's no real additional complexity being added: you make commits like normal (except you can do them offline), but now there's the added step of pushing changes to a remote server when you feel like it; I have a couple projects that have commits I haven't synced to GitHub in a long time, but I still get the benefits of source control.

 

Another argument in favor: learning how to use Git. Subversion starts breaking down when you have multiple developers on the same project, so if you want a career doing software/web development in a company then you'll need to learn Git... or Mercurial, it exists too, but I've never actually seen anyone use it.

Share this post


Link to post
Share on other sites

And a few more.

 

Sure, git is more hip right now (for whatever reason), but if the OP is looking for simplicity, I'd check out Mercurial first: no staging area, no arcane syntax, no history rewriting gymnastics (if you need that, you can still enable it through plug-ins). Like I said, I use both, but Mercurial is the one I find a lot more straightforward.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.