Tag Archive for 'update'

Subversion Tip of the Week

SmartSVN Quickstart

In Apache Subversion, the basic workcycle follows the ‘checkout-edit-update-commit’ format.

In this week’s tip, we get you off to a flying start with SmartSVN, the popular graphical client for Subversion, by covering the entire workcycle in three simple steps.

Step One: Perform a Checkout

1) Open the ‘Project’ menu and select ‘Check Out…’

2) Enter the URL of the repository you wish to checkout. Select ‘Next.’

3) Select the directory to checkout. If you want to checkout a revision other than Head, select the ‘Show Revision’ button and specify a revision number.

4) When you are happy with the information you’ve entered, select ‘Next.’

5) In the subsequent dialog, enter the local directory where you’ll store your working copy. Select the checkout depth, and click ‘Next.’

6) Choose whether to checkout a working copy or export files only. Select ‘Finish.’

7) SmartSVN will perform the checkout. You can now work on the files and folders in your newly-created working copy using SmartSVN.

Step Two: Perform an Update

Before you commit your changes back to the repository, it’s good practice to perform an ‘SVN Update.’ This is made easy with SmartSVN, simply press the ‘update’ button in the toolbar to get started.

In the subsequent dialog, specify which revision you wish to update to (default is the Head) and confirm the update.

Step Three: Perform Your Commit

Perform a commit by selecting the ‘Commit’ button from the toolbar.

Enter an appropriate log message and confirm the commit.

Looking for a cross-platform graphical client for your Subversion project? A free 30 day trial of SmartSVN Professional is available now. Find out more about SmartSVN at www.smartsvn.com

Subversion Tip of the Week

Updating to a Particular Revision From the Command Line

When updating your working copy in Apache Subversion, you usually run the ‘SVN Update’ command and update to the HEAD revision. However, in some instances you may need to update your working copy to a particular revision – or even revert to a previous revision. This is achieved by running the ‘SVN Update’ command and specifying your target revision with the -r command:

svn update -r revision-number

You working copy will now be at the specified revision! In addition, there are several commands that you may find useful when targeting a particular, non-HEAD revision:

1) Find out which revision you’re currently at:

svn log -q -r BASE

2) Find out which revision is the HEAD:

svn log -q -r HEAD

3) See what’s changed between your working copy revision and HEAD:

svn log -r BASE:HEAD

Intro to SmartSVN Change Sets

In Apache Subversion, it’s not unusual for developers to be working on multiple unrelated changes at the same time, in the same project. To distinguish between the different ongoing tasks in your project, SmartSVN supports ‘change sets’, groups of committable files and directories. Not only do change sets allow you to bring some order to your commits and updates, but it’s useful for grouping files together in order to commit them later. These change sets are an extension to the Subversion changelists.

In this short tutorial, we’ll provide an introduction to SmartSVN’s change sets by showing you how to create your first change set, and then how to add and remove files from them.

How to Create Your First Change Set

1) Select the files you wish to add to a new change set.

 

 

 

2) Open the ‘Change Set’  menu and select ‘Move to Change Set….’

 

 

 

3) Enter an appropriate message, which will be displayed as the name of the changelist, and decide whether you want SmartSVN to automatically delete the change set if it ever becomes empty. Select ‘OK’ once you are happy with the information you have entered.

 

 

 

 

 

 

 

 

 

 

4) SmartSVN will now go ahead and add these files to the change set.

 

 

 

If you don’t want to see them in the normal Files view, unselect View|Files Assigned to Change Set. This allows you to (temporarily) hide even unchanged or modified files which otherwise would clutter the file list.

How to Add a File to an Existing Change Set

1) Select the file you wish to add to an existing change set, followed by the ‘Move to Change Set…’ option.

2) Ensure the ‘Existing Change Set’ option is selected, and select the existing change set of your choice from the ‘Target Change Set’ combobox.

 

 

 

 

 

 

 

 

 

 

3) Select ‘OK’ to add this file to the existing change set.

Remove a File from a Change Set

1) To remove a file from a Change Set, select the file and open the ‘Move to change set…’ dialog.

2) Select the ‘Remove form Change Set’ option and click ‘OK’.

 

 

 

 

 

 

 

 

 

 

Right-click a Change Set to commit it. The change set’s Message will be used to prefill the commit message.

Not yet started with SmartSVN? You can download a free SmartSVN Foundation edition at http://smartsvn.com/

Three Steps to Perform an Update in SmartSVN

In WANdisco’s latest quick and easy SmartSVN tip, we show you how to update your working copy, in three simple steps.

Remember, you can download SmartSVN Foundation for free today, simply by visiting http://www.smartsvn.com/

1) Inside your SmartSVN installation, select the ‘Update’ button.

 

 

 

 

 

 

2) In the ‘Update’ dialog, you can choose to update to either the HEAD revision, or a particular revision number. In most instances, you’ll be updating to the HEAD revision. In this example, we’ll be updating to the HEAD, so ensure the HEAD checkbox is selected and click ‘Update.’

 

 

 

 

 

 

 

 

3) SmartSVN will go ahead and update your working copy. Note, you can check what changes have been implemented in the ‘Output’ dialog of your SmartSVN homepage.

 

 

 

 

 

You have now successfully updated your working copy.

Tip. This is a very basic update. In the ‘Update’ dialog, you can select the ‘Advanced’ tab to access some additional options, including:

  • Set depth to working copy
  • Allow unversioned obstructions
  • Include externals

 

 

 

 

 

 

 

 

Catch up on the rest of our intro to SmartSVN series:

Subversion Tip of the Week

Apache Subversion: Basic Workcycle

In Apache Subversion, the basic workcycle follows the ‘checkout-edit-update-commit’ format.

A ‘Checkout’ is the process of pulling all the files from your repository onto your local machine, where it becomes known as a ‘working copy.’ You can then work on these files in isolation, before sharing your work with the rest of the team by ‘committing’ back to the repository.

In this week’s tip, we’ll provide a handy introduction to this basic workcycle.

Checkout

To checkout a working copy, run the ‘svn checkout’ command, followed by the URL of your repository and the location where you wish to create the working copy.

In this example, we’re creating a working copy on the desktop, in a file called ‘Repo’:

Tip, if you’re using the free uberSVN platform, you can easily find out your repository’s URL by opening the ‘Repositories’ tab.

You can now edit the files and folders in your working copy.

Update

You may be ready to share your changes with the rest of your team, but it’s good practice to perform an SVN update first. This will pull any changes your colleagues may have already committed, into your working copy, ensuring your changes fit with the most up-to-date version of the project.

To perform an update, run the ‘svn update’ command, followed by the location of your working copy.

svn update (working copy location)

Commit

Let’s assume any changes your team committed are compatible with your changes, and go ahead with the commit. When performing a commit, you should leave a log message and include as much information as possible, as this can be an invaluable source of information if you ever need to revisit this revision. When performing a commit, the log message is entered in the “–m” format (for example, -m “added ReadMe file.”)

The commit itself is performed using the ‘svn commit’ command, followed the log message and the location of the working copy.

svn commit -m “log message” (working copy location)

In this example, we are performing a commit with the log message “added Admin Guide text.”

Need more Subversion know-how? After getting a great response from the Apache Subversion community in 2011, Subversion Live is back for 2012, bringing the Subversion community sessions covering everything from Subversion’s future, to expert-led best practices workshops, as well as the unique opportunity to meet the core Subversion committers. We’re currently running a very special early bird offer: register now using the ‘earlybird’ code to get a 25% discount (note, the early bird offer ends 10th August, so you better be quick!)