This is another post in our discussion on DVCS and git (see our git category in the right column for more). Distributed version control (DVCS) makes it easy to share changes as every change has a guid or unique id. With DVCS git, you can get the best of both worlds: simple merging and centralized releases. We will continue a Wednesday post on aspects of git and git resources into May. Atlassian provides a git tool with their Stash offering. In this post I want to go over the key steps in migrating to Stash.
Before You Begin:
Make sure the following steps have been completed.
Staging Environment – Set up a staging Stash environment to perform a test run of your import first, for review and validation before doing the production run. Note, this is best practice for ANY major service efforts with Atlassian systems. You can use an evaluation license for this test.
Atlassian Stash, git, SVN installed – Install Atlassian Stash on staging server, as well as git and SVN. (SVN install is required for the import processing.)
Mail server – Configure SMTP mail server settings on Stash server before you begin the import process. At the completion of the import, you will receive an email notification of success or failure (which can take a while depending on the size of your import).
SVN Permissions – You will need permissions authorization to your SVN repositories that will be imported, or the ability to import the SVN repositories “anonymously”. The importer supports both scenarios.
About Stash Logging – Stash process logging is logged to logback.xml in stash-home. Importer logging is logged to stash-home/logs.
- Review the above checklist.
- Install AppFusions’ Source Code Importer for Atlassian Stash plugin from Atlassian Marketplace
- Once installed, SCM Importer will be listed among the available Stash plugins.
- Apply for a license for the plugin.
Running the Import in 9 easy steps!
To run the import, follow these steps (screenshots):
1. Review the “Before you begin” checklist and “Getting Started” steps.
2. Access the importer user interface, as follows:
- Select the Source Code Import option in the Repositories menu, or,
- Click Import… button from the Projects screen
3. In the UI, define your SCM, and URL for the SCM Repository Source.
- If you require SVN authentication, select “Use Authentication”. You will be prompted for SVN username and password.
- If no authentication is required, do not select this option. The import will access SVN anonymously.
- If the SVN server URL is https, no problem. The certificate will be detected, and this is supported.
4. Define your Stash target, as follows:
- Select “Existing” or “Create New”.
- Select/define project (depending on existing or new).
- Define repository name
5. Click [Fetch SVN authors…] button to continue.
6. In the Source Code Import Details screen, your set import configurations are shown. Stash users are mapped to SVN authors, but you can override these mappings here. Check/adjust all of your SVN authors as desired, then click [Import into Stash] button to continue.
7. The Source Code Import Commenced screen is displayed. When import process has completed, an email with results will be sent to the logged in Stash user.
- If an error occurs during the process, the import is halted and you will be emailed the results.
- At anytime during the import, you may check progress in the Importer logs, located here: stash-home/logs.
- Depending on the size of your import, the full process can take some time, so please be patient.
8. Repeat this process on your production server
9. Congratulations! and we’d love it if you let us know about your success!
If you have any questions on DVCS and how best to work with git and Stash contact us at: firstname.lastname@example.org. At AppFusions we have also developed a Source Code Importer for Stash, Atlassian’s git offering. This importer significantly decreases the challenge of migrating SVN to git.