User Tools

Site Tools


software:subvesion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
software:subvesion [2019/12/07 15:28] rodolicosoftware:subvesion [2020/02/22 23:06] rodolico
Line 67: Line 67:
 ===== Maintaining a "stable" tag ===== ===== Maintaining a "stable" tag =====
  
-I've always been intrigued with people who use subversion with a tag that always points to the most recent stable version. Never figured out how they do it, but thanks to one of my associates, came up with this simple action when a new version has become your most recent stable version</.+I've always been intrigued with people who use subversion with a tag that always points to the most recent stable version. Never figured out how they do it, but thanks to one of my associates, came up with this simple action when a new version has become your most recent stable version.
   - Create a new tag. I usually use a version number   - Create a new tag. I usually use a version number
   - Delete the old stable tag if it exists. Be sure and use recursion.   - Delete the old stable tag if it exists. Be sure and use recursion.
   - recreate the stable tag from the new version   - recreate the stable tag from the new version
 +
 +The following list of CLI commands will do this for you on any recent copy of subversion, assuming you are in the root of a checked out version of the project. In other words, in a cli go to your recently perfect, checked in version of your project, then run the following commands.
  
 <code bash> <code bash>
 +# get a list of all tags
 +svn ls -v ^/tags
 +# create a new tag for this version (ie, v3.5.1)
 +svn copy ^/trunk ^/tags/v3.5.1 -m "Release v3.5.1"
 +# delete tag stable
 +svn delete ^/tags/stable -m "Changing latest stable version"
 +# copy this version to stable tag
 +svn copy ^/tags/v3.5.1 ^/tags/stable -m 'Setting v3.5.1 as stable'
 +# list your tags again
 svn ls -v ^/tags svn ls -v ^/tags
-svn delete http://svn.example.com/project/tags/stable -m "Changing latest stable version" 
-svn copy http://svn.example.com/project/tags/v1.0 http://svn.example.com/project/tags/stable -m "Making v1.0 the most recent stable copy" 
 </code> </code>
  
-Unfortunately, I did not record the exact steps when I did this the last time, so this is pretty bogusHoweverI'll be doing it again in the near future and will update this then. **Do Not blindly follow this.** It is some notes for me so I'll try to remember the next time I have to do it.+In the above, I'm using the caret (^) syntax to directly modify the subversion serverYou can also do the same thing by explicitly using the URL. To find the URLissue the command: 
 +<code bash> 
 +svn info | grep '^URL:' | cut -d':' -f2- 
 +</code> 
 +The URL listed after the colon can be used as a replacement for the caret aboveDon't forget to remove 'trunk' from the end of that, however, since you are currently working in the trunk directory.
  
 ===== Links ===== ===== Links =====
software/subvesion.txt · Last modified: 2020/07/10 22:37 by rodolico