User Tools

Site Tools


software:subvesion

Differences

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

Link to this comparison view

Next revision
Previous revision
software:subvesion [2019/12/05 17:24] – created rodolicosoftware:subvesion [2020/07/10 22:37] (current) rodolico
Line 4: Line 4:
  
 I sometimes use GUI's on my development workstation. For Linux, the best I've found so far is a very old one named pysvn-workbench, which is sufficient for my needs. However, some of the documentation is lacking. I sometimes use GUI's on my development workstation. For Linux, the best I've found so far is a very old one named pysvn-workbench, which is sufficient for my needs. However, some of the documentation is lacking.
 +
 +
 +==== Configuration File =====
 +
 +The configuration for pysvn-workbench is in ~/.WorkBench/WorkBench.xml. It contains some global preferences, then a list of all projects with their configurations. When preferences are changed, the file is renamed with a .old suffix, then recreated.
 +
 +In that directory is also a log file for actions (WorkBench.log) and the most recently used log message (log_message.txt).
 +
 +The WorkBench.log file appears to be rotated every 100k, ie it will rename the old log file to WorkBench.log.1, then start a new one.
  
 ==== Using Templates ==== ==== Using Templates ====
Line 31: Line 40:
   - Always work in trunk, unless you're working on a branch. tags is for when you want to create a check point.   - Always work in trunk, unless you're working on a branch. tags is for when you want to create a check point.
  
-===== Creating "stable" tag =====+NOTE: one thing I want to try in the future is creating fourth directory, stable. This will be a copy of the current stable version of the code. See below for more information.
  
-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</.+===== Using the Caret (^) ===== 
 + 
 +As of Subversion 1.6, from a working copy, you can use the caret (^) as a substitute for the root URL of the project. Thus, if your you are in your working copy someplace, the following are equivilent. Note that even if you only checked out trunk, the tags are still accessible since it is the URL that is substituted for the caret. This can greatly reduce typing. 
 + 
 +<code> 
 +http://svn.example.com/project/trunk/subdir1 
 +^/trunk/subdir1 
 +</code> 
 +<code> 
 +http://svn.example.com/project/tags/v1.5.0 
 +^/tags/v1.5.0 
 +</code> 
 + 
 + 
 +===== Creating a tag ===== 
 +<code bash> 
 +svn copy http://svn.example.com/project/trunk  http://svn.example.com/project/tags/1.0 -m "Release 1.0" 
 +</code> 
 +OR 
 +<code bash> 
 +cd /path/to/project 
 +svn copy ^/trunk ^/tags/1.0 -m "Release 1.0" 
 +</code> 
 + 
 +===== Moving a repository ===== 
 + 
 +  * [[http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html]] 
 +  * [[http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.load.html]] 
 + 
 + 
 +On the old machine 
 +<code bash> 
 +svnadmin dump --deltas reposname | bzip2 -c > /tmp/reposname.svn.dump.bz2 
 +</code> 
 + 
 +On the new machine 
 +<code bash> 
 +mkdir reposname 
 +svnadmin create reposname 
 +bunzip2 -c /tmp/resposname.svn.dump.bz2 | svnadmin load resposname 
 +</code> 
 + 
 +===== 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.
   - 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 URL listed below is one of our projects+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.dailydata.net/svn/camp_sysinfo_client_3/tags/stable -m "Changing latest stable version" 
-svn copy http://svn.dailydata.net/svn/camp_sysinfo_client_3/tags/v1.0 http://svn.dailydata.net/svn/camp_sysinfo_client_3/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 above. Don't forget to remove 'trunk' from the end of that, however, since you are currently working in the trunk directory. 
 + 
 +You can now publish your subversion address as 
 +**http://svn.example.com/svn/project_name/tags/stable** 
 + 
 +If you wish, you could also simply create a new subdir on the same level as trunk and tags and do the same thing, I'm guessing (haven't tried it
 + 
 +===== Links ===== 
 +  * [[https://stackoverflow.com/questions/851377/how-to-properly-create-an-svn-tag-from-trunk]] 
 +  * [[http://svnbook.red-bean.com/nightly/en/svn.branchmerge.tags.html]] 
 +  * [[http://svnbook.red-bean.com/en/1.6/svn.basic.in-action.html]]
  
software/subvesion.1575588240.txt.gz · Last modified: 2019/12/05 17:24 by rodolico