SmartSVN’s built-in Revision Graph tool provides a quick and easy way to get an overview of the hierarchical history of your files and directories. This history is primarily represented as ‘nodes’ and ‘branches.’ (Note, because the Revision Graph displays branches and tags, the Tag-Branch-Layout must be configured correctly.)
The Revision Graph is useful for seeing at a glance:
- Merged revisions
- Revisions that have yet to be merged
- Whether a merge occurred in the selected revision
- Which changes happened in which branch
- Which revision represents which tag
- When a file was moved, renamed or copied, along with its history
To access the Revision Graph, open SmartSVN’s ‘Query’ menu and select ‘Revision Graph.’
This will open the main Revision Graph screen.
The main section of the Revision Graph is the ‘Revisions’ pane. This displays the parent-child relationships between your revisions. Revisions are arranged by date, with the newest at the top.
In the Revision Graph, there are four main types of relationships that are represented by different line styles:
- Normal parent-child relationship – represented by thick, coloured lines.
- Complete merge relationship – created by performing a merge commit where all the source revisions are merged into the target. When ‘Merge Arrows’ is enabled, it is represented by thin, coloured lines.
- Partial merge relationship – created by performing a partial merge (cherry-pick) where not all source revisions are merged into the target. When ‘Merge Arrows’ is enabled it’s represented by thin, coloured, dashed lines.
- URL relationship – this is where branches have the same URL, but are not related (e.g when you have removed and re-added a branch.) When ‘Join Same Locations’ is enabled, this is represented by thin, gray lines.
In addition to the main ‘Revisions’ pane, the SmartSVN Revision Graph includes several additional views:
1) Revision Info – displays attributes of the selected revision (revision number, date, state, author who created the revision etc.)
2) Directories and files – displays the files that were modified as part of the selected revision.
From this screen, you can access several additional options:
- Export – export the Revision Graph as an HTML file by selecting ‘Export as HTML…’ from the ‘Graph’ menu. In the recently-released SmartSVN 7.5, this export function was improved to support exporting smaller HTML graphic files.
- Merge Arrows – select the ‘Show Merge Arrows’ option from the ‘Query’ menu to display the merge arrows. These point from the merge source to the merge target revisions. If the merge source is a range of revisions, the corresponding revisions will be surrounded by a bracket.
- Merge Sources – select the ‘Show Merge Sources’ option from the ‘Query’ menu to see which revisions have been merged into the currently selected target revision.
Haven’t yet started with SmartSVN? You can claim your free SmartSVN Professional trial by visiting www.smartsvn.com/download
In Apache Subversion, it’s easy to create a working copy and then examine the files and folders on your local machine. However, sometimes you may want to extract data about the contents of your repository without having to check out a working copy first. Subversion has two commands to help you with this, ‘svn list’ and ‘svn cat.’
To get an overview of the files/folders contained within your repository, use the ‘svn list’ command, followed by the repository URL.
svn list repository-URL
Tip. If you’ve followed best practices and have trunk/branch/tag folders, remember to specify which folder you want an overview for, or else this command will just list the three folders.
If you want more details about the contents of your repository (including the last revision each file changed, who made the change, and the date and time of the last revision) simply add the -v switch.
svn list -v repository-URL
You can also examine the output of a file in the repository using the ‘svn cat’ command, followed by the revision number you wish to examine and the file’s URL.
svn cat -r repository-URL
If you want to examine the most recent version of a file, you can simply specify the revision as ‘HEAD’ e.g
svn cat -HEAD repository-URL
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
Apache Subversion is gaining increasing popularity within the enterprise and, when you consider all the potential benefits, it’s easy to see why. Client requirements change, and new features can sometimes cause more problems than they fix. In these situations, Subversion effectively provides you with an undo button, allowing you to write some code, realise it doesn’t work, revert to a previous revision, write some more code that does work – and finally receive new client requirements and restore the original version of your project, ready to start again from scratch. Without Subversion, the above situation would have to be managed manually, but SVN provides all the functionality you need to make such situations as straightforward as possible.
Still on the fence about whether Subversion has a place in the enterprise? Here are our top three reasons, for keeping your enterprise projects under SVN’s version control:
- Easy Collaboration – Subversion makes collaboration easier by allowing multiple developers to access the same code in a central repository, regardless of geographical location. This is invaluable in distributed, global organisations.
- Keep Up to Date With Changes – Subversion keeps development teams synchronized with the latest changes in the central repository. Developers can pull all the latest changes into their working copy with a simple ‘svn update’ command.
- Revert to Previous Revisions – Subversion’s version tracking functionality allows you to recover previous versions of your project without the hassle of manually unpicking your changes. This is useful if you have implemented changes that haven’t worked out, or turned out to be unnecessary. In some situations, it may even be quicker to revert to an earlier revision and then re-implement only the changes that worked, rather than trying to isolate and remove specific changes. Having an easy way to restore previous revisions when development teams hit difficulties, can also have a big impact on maintenance costs.
- Improved Productivity – Ultimately, Subversion improves developer productivity. It allows multiple developers to work on the same project, at the same time, and imposes conventions that mean complications caused by accidental overwrites, lack of communication and manual merging, are less likely. Whenever defects are introduced, version control gives you the option of rolling back to a time before these defects found their way into your project.
Interested in seeing how Subversion could benefit your enterprise projects? 15 day free trials of both our Subversion MultiSite and Subversion Access Control products are available now.