Subversion, svn: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Deciding which Source Management Tool to use?]] |
|||
=== see also === |
=== see also === |
||
* [[Svn via https]] |
* [[Svn via https]] |
Revision as of 18:10, 21 August 2023
Deciding which Source Management Tool to use?
see also
- Svn via https
- Browse svn history with browser - ViewVC
- Backup and restore or migrate subversion/svn repositories
- Browse svn repositories with your browser: websvn
- move svn repository
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
svn, commit a message with an apostrophe
What will not work:
svn commit -m 'user's test'
What should work
svn commit -m "user's test"
What we want to show here
svn commit -m 'user'\''s test'
So we have three parts in the commit
'user' \' 's test'