I use Assembla to manage my Subversion repository. I have started some major revisions to my codebase and want to create a Tag of my most recent production revision ( which I forgot to do when I pushed that rev live to production a few weeks ago ).
I'm currently on revision 588, and want to create a Tag of revision 577. How do I go about doing this from the command line using Subversion within Assembla?
Assume my Assembla SVN URL is: https://subversion.assembla.com/svn/my_assembla_svn_directory/
You can always use the -r
parameter to refer to a specific revision. When doing so, you can also use the @rev
revision pinning to make sure you're referring to the layout of the Subversion revision at a particular revision. The following will create a tag from trunk on revision 577 and call this tag REV-1.2
:
$ svn cp -r 577 https://subversion.assembla.com/svn/my_assembla_svn_directory/trunk
https://subversion.assembla.com/svn/my_assembla_svn_directory/tags/REV-1.2
If you don't have a trunk
, branches
, and tags
directories, you'll need to move your work in order to create some:
$ # Move the current directory to the "trunk"
$ svn cp https://subversion.assembla.com/svn/my_assembla_svn_directory \
https://subversion.assembla.com/svn/my_assembla_svn_directory/trunk
$ # Make a corresponding tags and branches directories too
$ svn mkdir https://subversion.assembla.com/svn/my_assembla_svn_directory/branches
$ svn mkdir https://subversion.assembla.com/svn/my_assembla_svn_directory/tags
$ # Now, we can delete the old location. Let your developers know this,
$ # so they're not surprised by this and will be able to do a "svn relocate"
$ svn delete https://subversion.assembla.com/svn/my_assembla_svn_directory/
$ # Whoops. I should have done the tagging when I had a chance.
$ #Oh well, we'll use the `@rev` pinning:
$ svn -r557 cp https://subversion.assembla.com/svn/my_assembla_svn_directory@557 \
https://subversion.assembla.com/svn/my_assembla_svn_directory/tags/REL-1.2
Subversion doesn't implement tagging and branching except as a copy. This isn't unusual. Perforce implements branching in the same way. In fact, once you get use to it, it works out really well:
svn ls
on the right directory