Using Versions with Beanstalk
Setting up a Beanstalk repository with Versions is really easy. In this article we will show you how to checkout a Beanstalk repository, add a file to it, and make a commit.
After you have installed Versions on your Mac and created a Beanstalk repository, you are ready to use your repository. All you need to do is follow these simple steps:
Checkout your Beanstalk repository
To checkout your Beanstalk repository, go to your account, and then to the repository you created. The url to your account will be in following format:
- http://ACCOUNTNAME.beanstalkapp.com/REPOSITORYNAME
in our example we will use the account: http://myaccount.beanstalkapp.com/myrepo
The next step is to copy the Repository URL. This is the url of the repository which is required by Versions to create a working copy of your repository.
Once you have located your repository URL, go to the Versions application and choose the "Repository" button to create a bookmark. This bookmark will link to your Beanstalk repository and will allow you to download (checkout) your repository.
A window will popup and you will need to insert the name of your bookmark (the URL of the Beanstalk repository) in our case http://myaccount.svn.beanstalkapp.com/myrepo, and your username and password. You will need to use the username and password which you use for logging into Beanstalk (not your email). After filling in the data, click the "Create" button.
After you have created the bookmark, select it and do a checkout. You will find the checkout button on top left in Versions.
When you click the checkout button, you will be asked where to place the repository. The repository can be stored anywhere on your local hard drive, such as documents/svn.
When the checkout is finished you will see the folders and files downloaded to your computer. If your repository is empty, the directory will not contain files. In our case, there are three folders:
- branches
- tags
- trunk
Adding a file to your repository
Now that you did a checkout and have a working copy, we will add one file to the trunk folder. In order to do that, all you need to do is copy a file to the folder where you did the checkout with Versions. After that, the file will appear in your bookmark in Versions too, all you need to do is select it and click the "Add" button. This tells Subversion that the file is ready for commit to Beanstalk.
Commit to the Beanstalk repository
After you have added a file to your repository, the file is still not uploaded to Beanstalk. In order to do that, select your bookmark and then you will see a "Commit" button enabled. Click on the "Commit" button.
Now you will see a Versions window which will prompt you for entering a message. We recommend that you describe each commit with a detailed message about what has changed. This will help later on when you need to remember what you did.
All you need to do now is click the "Commit" button and Versions will begin uploading the files and updating your repository in your Beanstalk account. A window with a progress bar will disappear when the commit is finished. You can also see the new "changeset" in Beanstalk by logging into your Beanstalk account.
Well done! You have finished your first commit to your Beanstalk account. For more advanced Versions features check out the Versions website. We also recommend the free online book Version Control with Subversion.