Welcome Guest, Not a member yet? Register   Sign In
Managing versions of my app
#11

[eluser]Michael Wales[/eluser]
Quote:I am not familiar with Unix, using the command line and or compiling programs.

You will have to use the command line for a version control system, in most cases.

If you are looking for the easiest solution - that will keep you away from the command line - use Beanstalk or Unfuddle to host your repository. This will keep you out of the command line in setting up your repository.

For working with that repository, use Versions - by far one of the most user friendly SVN clients.
#12

[eluser]NateL[/eluser]
The easiest way I can suggest:

Get a free account with Unfuddle.
Create a project with a Subversion repository
Unfuddle will give you an http:// address - this is your repository address.

In Coda -
Create a new Site
Edit the Site info, and scroll down to Source Control
Enable Source Control by clicking the button "Checkout Source"
Paste that http:// address that unfuddle has given you
Put in your unfuddle username and password

start programming!

You're now using version control, and you can make commits, add comments to those commits, remove files, revert files, etc. etc. etc...everything Subversion.

Occasionally, I do run into issues and I do use command line. I learned from someone else - just like you, i found the documentation confusing and always ran into problems. Your best bet is to find someone local to you that is a professional and can answer questions on the fly. gold. Wink
#13

[eluser]whobutsb[/eluser]
I have a question about the SVN and previewing/testing the application. When I work on my applications I two versions of it. A production version, which is currently being used, and a development version which resides on another remote server, which I continually work on. When I'm working on my development app in Coda, i'm continually making changes and then saving it then opening it in Firefox for testing.

When I'm working on my application with SVN do I want to download my entire site from the repository and work on it the way I have been? Or do I download individual files? If I do it that way, how do I test the application?

Also when do I "commit" my changes that I made? Is commiting finalizing the changes and adding them back to the repository?

Thanks for the help with these questions. I know I need to start using some sort of Code Versioning system I just unsure how it will fit into my work flow.
#14

[eluser]maesk[/eluser]
I'm also in the process of setting up some kind of version control and there are so many options that I can't decide what's best.

GIT vs. subversion (I only heard of GIT today, in this thread)
Hosted solution vs. your own svn server (possibly with web interface such as warehouse?)

From the hosted solutions, which one of these do you think is "the best"?
- beanstalk
- unfuddle
- springloops

Basecamp integration and bug tracking would be nice but not essential. But I need a solution that allows to immediately deploy changes to the dev server.
And do you know if the version control functions from within applications such as TextMate, Dreamweaver and Oxygen work with the hosted solutions?

Any advice would be greatly appreciated.
#15

[eluser]Michael Wales[/eluser]
Quote:When I’m working on my application with SVN do I want to download my entire site from the repository and work on it the way I have been? Or do I download individual files? If I do it that way, how do I test the application?

Typically, you would have 3 areas of development. You develop locally, on your machine, and do your testing there. This is also where your checked out repository (working directory) will reside.

As you make changes, you commit them to your development server. This is kind of a staging area, and this is where you make sure everything will work perfectly in an environment that mirrors your production environment.

Finally, when all is done with a particular feature/application, etc. you will jump on your production server and perform an export of your SVN repository - bringing all of those new files over to the production server.

Quote:Also when do I “commit” my changes that I made?
When you are fearful that what you just completed may be lost, or break something. In general: commit when you are done working for the day, complete a feature, or complete a major milestone when working on a feature.

For instance, let's say we're allowing users to upload an avatar. I would commit when I finished the models, one for the avatar and altering the user model (to support avatars) and I would commit after completing the controller and view. Depending on what you are working on this may be more often or less often.

Quote:Is commiting finalizing the changes and adding them back to the repository?
Committing just sets a "marker" - it is a point in the development of your application that you can consistently return to. Using our Avatar example above (committing after the model changes and another commit after feature completion) we could easily roll our code back to when avatars didn't exist, or if we felt the model was solid but the implementation side of things (controller/view) were weak, had bugs, or presented security issues, we could just roll back to before they existed.

A very common way of developing applications is to use "branches." For instance, let's say adding in avatar support is a small part of completing updating user profiles and making them more powerful/customizable. We would probably want to start a whole new branch for these changes. We would make hundreds of code changes and commits, rolling forward and backward, making sure everything is good within this branch. Once we know that this branch is final - it's good to go, we would then merge that branch back into the trunk - which is the master, final version, of the code.

After a bit of testing in development environment - off it goes to production.

By using branches, you allow other work to continue within the trunk (or other branches), without the possibility of messing up what you are working on. When you go to merge, you'll be presented with any "collissions" that occur and will than have to fix those. But, that's a lot better than working on one file for a few days, trying to commit only to find out someone changed it, so you update your local copy, and then learn everything you've been working on is completely different now.
#16

[eluser]Michael Wales[/eluser]
Quote:GIT vs. subversion (I only heard of GIT today, in this thread)
Really look at and understand the differences between the two. Don't just pick one because a service (like GitHub exists) - that is a service, not a core piece of the technology that you are selecting.

Quote:Hosted solution vs. your own svn server (possibly with web interface such as warehouse?)
For personal projects, I tend to use my own web server (which has an svn directory above webroot, for repositories). If I am collaborating on a project or working on open source stuff, I use a hosted service (primarily because my web server doesn't support multiple users - I'd have to hand out my admin account for people to svn).

Quote:Service comparisons
I really like Beanstalk - unfortunately it's SVN only and the space limitations are smaller than others (on the free account). Good thing: you can create unlimited free accounts. Basecamp integration (as well as other services) is phenomenal (and very useful for commenting on other's commits).

Unfuddle is nice, it supports both svn and git.

For open source work, there is no better solution that GitHub - it's forking/pull features are amazing when it comes to receiving third-party contributions.
#17

[eluser]Gone_Skiing[/eluser]
I had a similar problem and like others here I use Subversion. I did look at Git but chose SVN. I don't remember off-hand why though.

I run a local SVN server on a linux box. There are some good SVN setup tutorials elsewhere here in the forums and in the tutorials section.

From svn I checkout the entire source tree so that I have a working development version of my code. As I make changes, I'll unit test each feature or change before checking it in to the repository. Periodically (currently weekly) I will redeploy the current state of the code and regression test the whole site. If it passes this test I tag the code with a release label.

The live version of the site is not checked out from the repository (If the code somehow got altered here it could be checked back in). Instead I export the latest release label. If a problem arises it is easy to revert to an earlier release label (database changes not withstanding).

My SVN repository (within the project) has three directories:
main/
dev/
tags/

The main/ directory is for all main lined code. Currently all changes (once tested) are checked into the main directory.

The dev/ directory is for any necessary development branches. For example a version 2 of the site would be developed under the dev/ directory so that incremental development would not restrict bug fixes on the current main branch.

The tags/ directory is for labels. SVN doesn't have labels per se. Instead you do a copy
Code:
svn copy file:///home/svn/repos/<project>/main/app file:///svn/repos/<project>/tags/REL-<next rev id> -m "Tag Release <next rev id>"

To update the live site I simply cd to the base of the site and export the tag:
Code:
svn export file:///home/svn/repos/<project>/tags/<Release Tag> app

Hope this helps!

-Nick
--------
http://www.lunchleague.net
#18

[eluser]whobutsb[/eluser]
Thanks Michael Wales for the great explaination! Its really made me excited to start using SVN to control the versions and updates of my code. Today I downloaded TortoiseSVN and I installed it on my Windows Development Server. Things seems to be going okay, I created a new repository in my WAMP directory called HarborForceSVN (HarborForce is the name of the application). I then imported my HarborForce Directory in to HarborForceSVN. The problem i'm running into now is trying to connect to the repository with Coda. The path to the repo file on the windows server is: C://wamp/www/HarborForceSVN

In code I have tried the following:
svn://Volumes/wamp/www/HarborForceSVN
http://Volumes/wamp/www/HarborForceSVN
http://icarus/HarborForceSVN --(icarus is the name of the windows server)

And just about every other variation.

When I try the following url:
file:///Volumes/wamp/www/HarborForceSVN
I get the error message:
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///Volumes/wamp/www/HarborForceSVN'
svn: Expected FS format '2'; found format '3'
#19

[eluser]maesk[/eluser]
Thanks a lot, Michael Wales, for the info! I'll probably try Beanstalk and Unfuddle.
I saw this video in which Linus Torvalds says everyone using SVN instead of GIT is an idiot (I'm not exaggerating, that's what he actually says in the video).
I think for my purposes SVN is better, but I'm still not 100% sure.

We're a team of 6 people working on an application, I'm the only one that changes the actual code, the others edit XML files that are part of the app. They're no programmers and can't be bothered with the command line but they do need some kind of version control so they don't overwrite each others work. They work primarily with oXygen which has a built-in SVN client but no support for GIT as far as I can see.
Also, I'm working with Dreamweaver and TextMate and both have built-in SVN support but nothing for GIT.

So, if I may ask again, under these circumstances would you say that SVN with Beanstalk or Unfuddle is the best way to go?

Thanks,
maesk
#20

[eluser]mvdg27[/eluser]
Hey guys .. interesting discussion so far. I'm currently testing out some stuff, just to get it working.

But I'm running into some problems .. or actually, I guess I don't really understand yet what I'm doing .. Wink Any pointers would be great!

Anyway .. I've installed SVN on my server and I've created a repo through the "svnadmin create" command. Now on my local linux box, I have RapidSVN installed, and I seem to be able to connect to my server through SSH with RapidSVN.

Now the thing I'd like to achieve, is that I have working version on my local computer, and that I can easily upload my changes and test them there, before I actually put it on the live server. But I can't figure out where my files end up (on the server side) ..

Anyone here that has this setup already, that can give some advice/ explanation?

Thanks a lot!




Theme © iAndrew 2016 - Forum software by © MyBB