software:subvesion
Differences
This shows you the differences between two versions of the page.
| — | software:subvesion [2020/07/11 03:37] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Subversion ====== | ||
| + | |||
| + | ===== pysvn-workbench ===== | ||
| + | |||
| + | 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, | ||
| + | |||
| + | |||
| + | ==== Configuration File ===== | ||
| + | |||
| + | The configuration for pysvn-workbench is in ~/ | ||
| + | |||
| + | 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, | ||
| + | |||
| + | ==== Using Templates ==== | ||
| + | |||
| + | Templates sound like a great idea, but figuring out how to set them up is pretty much undocumented. I finally started looking at the source and found the following: | ||
| + | |||
| + | - Create a directory | ||
| + | - in that directory, place one or more files with the suffix .template | ||
| + | - Open PySVN | ||
| + | - Select a project | ||
| + | - Open Project | Settings from the main menu | ||
| + | - Under New Template File Folder, enter the directory you created. | ||
| + | - In the future, every time you create a new file, you can use one of the templates. | ||
| + | |||
| + | Note I have not been able to figure out a way to set one template folder for all projects. You have to set the template folder for each one. | ||
| + | |||
| + | ===== Set up standard layout ===== | ||
| + | |||
| + | - Create the new repository (aka project) | ||
| + | - Check out the project | ||
| + | - Create the following directories | ||
| + | - branches | ||
| + | - tags | ||
| + | - trunk | ||
| + | - Check the project back in | ||
| + | - 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. | ||
| + | |||
| + | 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 ===== | ||
| + | <code bash> | ||
| + | svn copy http:// | ||
| + | </ | ||
| + | OR | ||
| + | <code bash> | ||
| + | cd / | ||
| + | svn copy ^/trunk ^/tags/1.0 -m " | ||
| + | </ | ||
| + | |||
| + | ===== Moving a repository ===== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | On the old machine | ||
| + | <code bash> | ||
| + | svnadmin dump --deltas reposname | bzip2 -c > / | ||
| + | </ | ||
| + | |||
| + | On the new machine | ||
| + | <code bash> | ||
| + | mkdir reposname | ||
| + | svnadmin create reposname | ||
| + | bunzip2 -c / | ||
| + | </ | ||
| + | |||
| + | ===== 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. | ||
| + | - Create a new tag. I usually use a version number | ||
| + | - Delete the old stable tag if it exists. Be sure and use recursion. | ||
| + | - 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> | ||
| + | # 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 | ||
| + | </ | ||
| + | |||
| + | In the above, I'm using the caret (^) syntax to directly modify the subversion server. You can also do the same thing by explicitly using the URL. To find the URL, issue the command: | ||
| + | <code bash> | ||
| + | svn info | grep ' | ||
| + | </ | ||
| + | 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:// | ||
| + | |||
| + | 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 ===== | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
software/subvesion.1575588240.txt.gz · Last modified: (external edit)
