Tag Archive for 'commit'

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

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/

How to Perform a Commit in SmartSVN

If you’ve been following our series of intro articles to SmartSVN, you’ll already know how to download and install this cross-platform Apache Subversion client, and how to checkout a working copy using both the detailed checkout and quick checkout options.

In this post, we’ll cover another essential function for SmartSVN users: committing your changes to the repository.

1) Select the dedicated ‘Commit’ button from inside your SmartSVN installation.

 

 

 

 

 

 

2) The commit dialog will list all the modified files. Select which files you wish to commit, and ensure you enter an appropriate log message.

 

 

 

 

 

 

 

3) If you need more information about what has changed in each revision, select the ‘History’ button followed by ‘Get from Log…’

 

 

 

 

 

 

 

4) In the ‘Revisions’ dialog, you can view the previous commit messages, the time and author of those commits, and the path.

 

 

 

 

 

5) When you are ready to commit your changes, press the ‘Commit’ button in the Commit dialog.

 

 

 

 

 

 

 

You have now successfully committed your changes to the repository.

Not yet tried SmartSVN? You can download and use it for free, simply visit http://smartsvn.com/download

WANdisco’s August Roundup

This month we announced some exciting releases for the Apache Subversion community: the release of Subversion 1.7.6, and updates for uberSVN and TortoiseSVN.

Building on the 1.7 series, Apache Subversion 1.7.6 added even more fixes and enhancements for the SVN community:

  •  A fix for running tests against httpd version 2.4
  • Constant struct initialisers now used for C89 compatibility
  • Fixes for the output of ‘svn propget -R’ ‘svn proplist’ and ‘svn status’
  • Optimized ‘svn upgrade’ performance on large working copies
  • A fix for ‘svn upgrade’ on working copies with certain tree conflicts
  • Fixes for two asserts into errors for TortoiseSVN

More information on what’s new in Subversion 1.7.6 can be found in the Changes file. As always, if you want to get your hands on the latest, certified binaries you can do so from our website. The latest version of TortoiseSVN – 1.7.8 – is also available for download. This release is linked against Subversion 1.7.6, and features a list of bug fixes. For more information on all the updates and fixes in TortoiseSVN 1.7.8, check out the Changelog.

The uberSVN community also saw an update, as the WANdisco developers finished off uberSVN ‘Chimney House’ Release 3.

uberSVN ‘Chimney House’ Release 3 features many improvements and enhanced functionality for uberSVN’s ever-growing community of users. These include:

  •  Further improvements to the way uberSVN handles LDAP and LDAPS.
  • Improvements to uberSVN APIs and internal development of the uberSVN SDK (public release coming soon!)
  • New manageAPPS page allows you to see metadata attached to your APP license, such as expiry date, number of named users, and more.
  • A list of bug fixes, including some fixes and alignment/mapping of the uberSVN Access Control Team Leader and uberSVN Delegated Team Admin (where uberSVN Access Control is active)
We also conducted a community poll to find out more about how you’re using Subversion. We asked what operating system your Subversion server is running on and, once again, there was a very clear winner…..

You may have already noticed that we’ve been adding new Subversion refcards. We’ve had such a great response that we’ve already put together two more – ‘All About the Apache Subversion Commit Command’ and ‘All About Checkouts.’ The first covers everything from the basic “what is a commit?” to more advanced information on editing log messages, ignoring files and directories, and an intro to hook scripts. ‘All About Checkouts’ provides a quick reference to making full use of the checkout command and understanding the messages generated under different scenarios.

We hope you’re enjoying these latest refcards, and if have any ideas for future refcards, please do not hesitate to Contact Us. If you’re after more Apache Subversion know-how, then why not take a look at our upcoming Subversion Live conference?

On the enterprise side of things, we published a new case study of our enterprise-class Subversion MultiSite product. The case study looks at how global logistics technology leader Navis – a subsidiary of Cargotec, enjoyed a 10x improvement in Subversion performance and achieved 24-by-7 uptime across all of their development sites after implementing our Subversion MultiSite solution. Read the Navis case study in full to find out more.

Also this month, WANdisco CEO and co-founder David Richards was asked to do an interview with BloombergTV – check out the full video interview below!

Finally our friend, photographer Matt Lollar popped into the office to take some new snaps of WANdisco’s Sheffield office.

 

New Refcards: All About Subversion Checkouts and Commits

Need an intro to some essential Apache Subversion commands? We got such great feedback from last month’s branching and merging refcards, that we’ve already put together two more free refcards for the Subversion community.

All About the Apache Subversion Commit Command’ covers everything from the basic “what is a commit?” to more advanced information on editing log messages, ignoring files and directories, and an intro to hook scripts.

Meanwhile, ‘All About Checkouts’ provides a quick reference to making full use of the checkout command and understanding the messages generated under different scenarios. This refcard covers:

  • What is a checkout?
  • Performing a checkout from the command line
  • Performing a checkout with TortoiseSVN
  • How to create a nested folder
  • Changing the checkout file data

We’ve got even more refcards lined up for the coming weeks, so be sure to keep checking back for all the latest free training content. And if you’ve got an idea for a Subversion refcard, please don’t hesitate to Contact Us.

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.

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!)

Introduction to Apache Subversion

What is Apache Subversion?

Subversion is an Apache-licensed, open source software versioning and version control system that can track changes to files, folders and directories. It can also be used to recover previous versions of data, and examine the history of how a particular dataset has changed. Subversion can operate across networks, encouraging collaboration by allowing team members at various locations to work on the same set of data. Subversion can be used to manage any collection of files – web pages, binaries, documentation – not just source code!

Downloading and Installing Apache Subversion

Certified open source Apache Subversion binaries are available to download from http://www.wandisco.com/subversion/download

To install, open the file to launch the setup wizard and follow the onscreen instructions to define which components you wish to install, and the install location. Enter the name of your server, the host port, and define the repository and repository location prefix – and hit install.

Alternatively, uberSVN makes Subversion easy and intuitive to use, and is free to download and free to use.

Creating your first repository

Once Subversion is installed, the first thing you need to do is create a repository. To create your first repository, open the command line, change the current directory to where you want to create your repository, and run the ‘svnadmin’ command:

svnadmin create {directory name}

Checking out a Project

To start working on your project, you must check out a working copy of the repository. This is achieved with the ‘checkout’ command:

svn checkout file {file location}

Commit Your Changes

Once you’ve made some changes to your working copy, you’ll want to push your changes to the server. Perform an “svn update” and an “svn diff” to test your changes, and resolve any warnings raised by Subversion, before committing. Once you’ve finished checking your modifications, and are ready to store the new revision in the repository, run the ‘commit’ command:

svn commit {path}

Get other people’s changes

When someone else performs a commit to the repository, you’ll need to pull those changes into your working copy, to ensure the latest trunk changes are compatible with what you’re doing in your working copy. Changes can be pulled into your working copy with the update command:

svn update {file name}
or
svn update {directory name}

Adding Files to a Project

Now you know how to checkout a working copy and commit changes back to the repository – but as you continue to develop your working copy, you may wish to add some new files to your project. When adding new files to Subversion, you need to tell the Subversion server about the files with the following command:

svn add {file name}
or
svn add {directory name}

Note that the new files won’t appear in the repository until you perform an ‘svn commit’ and send them to the repository.

Deleting Files from a Project

If at some point you want to remove these files from Subversion, run the delete command:

svn delete {file name}
or
svn delete {directory name}

Again, you must perform a commit before the file is deleted from the repository. You can also run ‘svn list’ to confirm that the file was successfully deleted from the repository.

And if you get stuck…..

The ‘svn –help’ function provides a summary of available commands or, for more information on a particular command, use:

svn help {command}

Other useful commands

  • svn status {path} – prints the status of working copy files and directories.
  • svn diff – display the differences between two revisions.
  • svn merge – applies the differences between two sources to a working copy path.
  • svn move SRC DST – think of this as ‘svn copy’ that automatically deletes the source file. This command moves a file or directory in your working copy, or in the repository. Note that Subversion does not support cross-repository moving, so it is impossible to move files across repositories with this command.
  • svn list – allows you to view the content of the Subversion repository, without having to download a working copy.
  • svn log – Subversion remembers every change made to your files and directories. This command displays the commit log messages. By default, it will show the information for the current working directory of your working copy. Alternatively, different paths can be specified.

Need more info?

On June 14th, 2012 we will be hosting a free ‘Introduction to Subversion’ webinar. This course is intended as a primer for new users or people who are thinking of making the jump to Subversion, and will cover the following topics:

  • Repository basics – creating and organizing
  • Checkouts, working folders, editing files and checkins
  • Reporting on changes
  • Simple branching
  • Simple merging

This webinar is free to attend, but places are limited so register now to avoid disappointment.

Even More Free Subversion Webinars

We hope you’re enjoying our bi-weekly free Subversion webinars! After getting a great response from the community, we’ve announced the next few webinars in the series, including another webinar on branching and merging, as so many of you requested!

Here’s what’s coming up over the next few months:

  • Checkout Command – Although checkout is the most frequently used Subversion command, it has many options that few users are aware of. During this session, attendees will learn how to make full use of the checkout command and understand the messages it generates under different scenarios.
  • TortoiseSVN 1.7 New Features – Attend this webinar to learn all about the latest changes and get the most out of TortoiseSVN 1.7.
  • All About the Subversion Commit Command – Take a closer look at the Subversion commit command, including commit dialog options, unversioned files, changelists, and common problems and how to avoid them.
  • Introduction to Subversion – Back to basics! This course is intended as a primer for both new users and people who are thinking of making the jump to Subversion.
  • Version Control using Subversion – Learn a little more about the how and why we use version control; we will point out the advantages of version control, using SVN as an example.
  • Advanced Branching and Merging – This webinar will cover the meaning of merge messages, analyzing branches using revision graphs, using svn:mergeinfo and the different merge types (reintegrating a branch, merging a range of revisions, and merging two different trees.)

All these webinars are free, but places are limited. Register now to avoid disappointment.