Difference between revisions of "Subversion"
(Status information section added) |
m |
||
Line 89: | Line 89: | ||
</table> | </table> | ||
− | More information at < | + | More information at <a href="http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html" >http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html</a> |
<h1> Basic Windows Subversion Usage </h1> | <h1> Basic Windows Subversion Usage </h1> |
Revision as of 19:03, 11 January 2016
Contents
Basic Linux Subversion Usage
Install subversion
In order to use subversion repositories, you should install it before. In linux debian/ubuntu OS:
sudo apt-get install subversion
Download a repository
svn co svn+ssh://<USER>@<SERVER>/<COMPLETE_PATH>
Basic Commands
Update repository | : | svn up |
Add a File | : | svn add <FILENAME> |
Upload modifications | : | svn ci (equivalent to svn commit) |
: | svn commit | |
Upload modifications with comments | : | svn ci -m "<YOUR_COMMENT>" |
: | svn commit -m "<YOUR_COMMENT>" | |
Check status | : | svn st |
Check logs | : | svn logs |
Status information
The execution of "svn st" shows information about the local status of the repository’s files. This information is shown through a tag before file's name. The main tags:
M | : | The file has been modified and it will replace the old version in the next commit. |
? | : | The file is new and it is not in the version control. |
A | : | The file was new and it will be added in the next commit. |
More information at <a href="http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html" >http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html</a>
Basic Windows Subversion Usage
Download and check:
http://tortoisesvn.net/
Subversion Manager
Relocate server
svn sw --relocate svn+ssh://<USER>@<OLD_SERVER>/<COMPLETE_PATH> svn+ssh://<USER>@<NEW_SERVER>/<COMPLE_PATH>
Dump
To create a file with all the repo
svnadmin dump <SVN_REPO_NAME> > <SVN_DUMPFILE_NAME>
Load
To create a repo from a dump file
svnadmin create <SVN_REPO_NAME> svnadmin load --ignore-uuid <SVN_DUMPFILE_NAME> < <SVN_REPO_NAME>
Filter
To create a repo file with a specific directory within the dump file
svndumpfilter include <PATH_TO_DESIRED_DIR> --drop-empty-revs --renumber-revs --preserve-revprops < <SVN_DUMPFILE_NAME> > <SVN_DESIRED_DIR_DUMPFILE_NAME>
However, the <SVN_DESIRED_DIR_DUMPFILE_NAME> keeps the directory structure of the old repo. If you want to delete it:
1) Edit <SVN_DESIRED_DIR_DUMPFILE_NAME>
2) Remove the top directory (e.g.):
Node-path: 2007-2008 Node-action: add Node-kind: dir Prop-content-length: 10 Content-length: 10 PROPS-END
3) Remove all the references to the top directory (e.g.)
sed -i 's/Node-path: 2005-2006/Node-path: /g' asignaturas_2005-2006_dump sed -i 's/Node-copyfrom-path: 2005-2006/Node-copyfrom-path: /g' asignaturas_2005-2006_dump