Version control with Flash Builder and Dropbox

Web Development

0comments

tweet

Beware your back

Working with version control should be part of your daily work, if it is not already, you can save a lot of headaches. If you are freelance, or your company doesn’t work with version control because your project is not bigger enough, or if you work on two computers (home and office) I recommend you work under version control and use Dropbox to access to your project anywhere you are or to work with a partner.

What I’ll explain here is how to create a repository on Dropbox, without pay any SVN hosting services, and how to work with from Flash Builder. You can use any other program that has SVN support. You can share your repository with colleagues or sync it all at home.

Tools

  • Flash Builder
  • Versions (50 dollars). You can use another client, but this is my favorite.
  • Dropbox (2,5Gb free space)

Workflow

Create a folder in Dropbox folder to store your repositories (projects under version control). This will do just once.
Create a new repository with Versions in that folder, it will be our project repository.
Do a “check out” where we go to work locally (not Dropbox).
Work only and exclusively in our local folder.
Update the repository with each major change (do a “commit” to the repository)
Continue working
If you work with a team, share this folder using Dropbox.

Why not work directly in Dropbox?
Perhaps you wonder why not work directly with Dropbox, since this is a version control, if you sync one and have our history files and such.
We do not want to do that for several reasons:
Dropbox is not a real version control and we can operate it from our favorite app.
In Dropbox website we have a history of files, but nothing more, with SVN we have access to comments made with each change, compare files from previous versions and all inside Flash Builder.
Although the main reason is you will not want to work more than one person in the same file only with Dropbox. Could be a hell.

First steps

Create a Dropbox folder to store all our repositories from now. In my case is Dropbox/SVN-Repositories/
Make sure that we will use the library 1.6 on Versions preferences.
Check 1.6 Subversion library
2. Create a local repository
Create new repository in Versions
Select our folder where we’ll store all our repositories.
Create new repository in Versions
3. Checkout your repository, this is a local copy to work with. Create a folder within your workspace folder, in this case “testSVN” within that folder, Versions will create your local copy of the repository with the name you want, in our case DEV.
Click on Check out
Select local folder

The repository and the local copy are working, let’s make Flash Builder working with SVN.

Install Subversion on your OSX

Download and install the Subversions binaries for your OS from CollabNet

Install Subeclipse on Flash Builder

1. Select Install new software on the Flash menu Builder Help (Help> Install new software …)
Select Install new software
2. Select Add
Click on Add
Flash Builder is based on Eclipse 3.6.1 “Helios” and according to the Subeclipse website we have to install version 1.6.x. In the field enter the name you want to remember the plugin, and the next url in Location: http://subclipse.tigris.org/update_1.6.x, que trabaja con Subversion 1.6.
It's working
3. Select only the required options
Select only the requiered staff
Click Next, a summary of the installation is showed, click Next, accept the license and then finish. Maybe a security warning is showed, proceed with installation.

Everything is installed, let’s go to work with Flash Builder and Subversion!

Getting started with subversion in Flash Builder

1. Create a new actionscript project and select the folder where we have our local copy of the repository.
Select your local folder
2. As you can see, Subversion is already running. There is a question mark (?) next to the files and folders, it means that version control doesn’t know what to do with these files, they are unknown to the repository.
It's working
3. Select the folders and files, press the right mouse button and select Team> Add to Version Control. Once this is done we will see a + mark next to the files, meaning that they have been added to the repository in next commit.
It's working
In the Package Explorer panel, select our project, in the context menu select Team> Commit. We’ll upload our files to the repository.
On the next screen, select the files you want to update and make a comment about the changes made, as is our first update, type “Initial commit.
When changes have been made, the following icon represents that the files are updated with the repository.
It's working
Check the files are already in the repository with Versions.
It's working
Check the commits historial.
It's working

Working with the repository from another computer

1. Well, we already have a computer running subversion, by coincidences of life I have to work from my laptop, so I set my project on that computer too.
File> Import> Other and select the folder in SVN the only option there: Checkout projects from SVN
On the next screen select Create new repository location.
Enter the path to our repository (of the Dropbox). We can access this information by pressing CTRL + I in Versions, in our case file://localhost/Users/peruho/Dropbox/SVN-Repositories/testSVN
It's working
On the next screen select the root of our repository and click next.
Select Checkout as a project in the workspace, type the project name and click Next
Select the path where you want the local copy /2011/testSVN/DEV
2. Everything is running on our laptop.
It's working

Things to consider

There are some important things we must not forget, like not touch our Dropbox folder (SVN-repositories), never change anything, keep in mind that it is a database where Subversion is storing all our changes.
When we want to make a copy of our working copy, note that you can’t simply make a copy of the folder from Finder, if you do that you are copying too a lot of hidden files that store information from our working copy, and could be a mess. So we have to export to a new folder, this can be done from Versions.
If we want to upload a clean copy to the repository of a project we have to select import.

0Comments

Contact Info:

Rules

Be respectful of others at all times.
Your comment will be moderated and will be deleted if is consider blog-spam of any kind, or you are an IE6 user (just kidding! well... maybe not)

( required )

language selector