software:subvesion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
software:subvesion [2019/12/07 15:18] – rodolico | software:subvesion [2020/02/22 23:11] – [Set up standard layout] rodolico | ||
---|---|---|---|
Line 39: | Line 39: | ||
- check out the project again, but with the url/trunk | - check out the project again, but with the url/trunk | ||
- 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. | ||
+ | |||
+ | NOTE: one thing I want to try in the future is creating a fourth directory, stable. This will be a copy of the current stable version of the code. See below for more information. | ||
+ | |||
+ | ===== 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. | ||
+ | |||
+ | < | ||
+ | http:// | ||
+ | ^/ | ||
+ | </ | ||
+ | < | ||
+ | http:// | ||
+ | ^/ | ||
+ | </ | ||
+ | |||
===== Creating a tag ===== | ===== Creating a tag ===== | ||
Line 53: | Line 69: | ||
===== Maintaining a " | ===== Maintaining a " | ||
- | 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 ^/ | ||
+ | # delete tag stable | ||
+ | svn delete ^/ | ||
+ | # copy this version to stable tag | ||
+ | svn copy ^/ | ||
+ | # list your tags again | ||
svn ls -v ^/tags | svn ls -v ^/tags | ||
- | svn delete http:// | ||
- | svn copy http:// | ||
</ | </ | ||
- | Unfortunately, I did not record | + | In the above, I'm using the caret (^) syntax to directly modify |
+ | <code bash> | ||
+ | svn info | grep '^URL:' | cut -d':' | ||
+ | </ | ||
+ | The URL listed after the colon can be used as a replacement for the caret above. Don't forget to remove ' | ||
+ | |||
+ | You can now publish your subversion address as | ||
+ | **http://svn.example.com/ | ||
+ | |||
+ | 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' | ||
===== Links ===== | ===== Links ===== | ||
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
software/subvesion.txt · Last modified: 2020/07/10 22:37 by rodolico