Subversion, svn

From Andreida
Jump to: navigation, search

see also


Contents

svn, What you normally need

  • get current version
svn up
  • commit your changes
svn commit -m '<description>'


Get an idea about your svn-urls:

svn info

Create a branch from an existing Url: (use ", not ' with Windows)

svn copy https://192.168.20.1:3690/svn/src/c++/YourProject/trunk \
https://192.168.20.1:3690/svn/src/c++/YourProject/branches/YourFixForBadError \
-m 'we have a bad bad error'

You just created the branch in the repository, now get it:

svn up

Do your changes and fixes, then

svn status

do get an idea which files you added or changed. If you added files, add them to subversion with

svn add <file>

Commit all your changes with (" for Windows)

svn commit -m '<description>' 

if it took a lot of time for all this, get the current trunk into your branch:

svn merge <url-to-trunk>
svn status
svn diff
svn commit


Go to your trunk

cd <whatever>src/c++/yourProject/trunk

if you are unsure, what you did:

svn diff <trunk-url> <branch-url>

merge the branch into the trunk:

svn merge <url-to-branch>
svn status
svn commit -m '<description>'

ignore files or directories (without /)

svn propedit svn:ignore .

undo an "add"

svn revert --recursive <folder>
svn revert --recursive .

other project as subdirectory, internal link

If you have a repository with the path

/c++/_internal

and you in some project like

/c++/myProject

you want to use the first one without using ../ you can use the following (the last . is important too, Windows: use " instead of ')

svn propset svn:externals '^/c++/_internal _internal' .
svn up
Personal tools
Namespaces

Variants
Actions
Navigation
Tools