Obsah
Používání SVN
aktualni revize do souboru – http://stackoverflow.com/questions/111436/how-can-i-get-the-svn-revision-number-in-php
Externals
vejit do slozky, kde chci pridat externals
tam spustit prikaz
svn propset svn:externals 'akismet http://plugins.svn.wordpress.org/akismet/trunk' .
kde akismet je slozka, do ktere se udela checkuout repozitare http://plugins.svn.wordpress.org/akismet/trunk property 'svn:externals' set on '.'
http://weierophinney.net/matthew/archives/132-svnexternals.html
Autoprops pro Id a keywords obecne
v konfiguračním souboru
- Right click on any Windows folder
- Select TortoiseSVN→Setting
- Click on the 'Edit' for Subversion configuration file
v sekci [miscellany] odkomentovat
enable-auto-props = yes
do sekce [auto-props] vložit
- .php = svn:keywords=Id Date Author Revision LastChangedDate LastChangedBy HeadURL;svn:eol-style=native
- .js = svn:keywords=Id Date Author Revision LastChangedDate LastChangedBy HeadURL;svn:eol-style=native
- .css = svn:eol-style=native
- .java = svn:eol-style=native
- .jsp = svn:eol-style=native
- .sql = svn:eol-style=native
- .tpl = svn:eol-style=native
- .txt = svn:eol-style=native
http://www.mediawiki.org/wiki/Subversion/auto-props#TortoiseSVN_.28Windows.29
U existujících souborů
find . \( -name "*.php" -o -name "*.js" \) -exec svn propset svn:keywords Id {} \; svn co -m "Pridani keywords"
Správné konce řádků pro unix i windows
zajištuje klíčové slovo eol-style na hodnotu native
svn:eol-style=native
http://www.zope.org/DevHome/Subversion/SubversionConfigurationForLineEndings
Vrátit zpět provedený commit
Say you just made a commit (revision 123 for file apple.py), you discovered (after the fact) that it was just crap and you want the previous version (revision 122) back.
The common way to do it is with a merge of a reverse changeset (or something):
svn merge -r 123:122 apple.py
If your Subversion setup is recent enough (I successfully tried with version 1.5.1 e.g.) it is also possible to use the –change (-c in short) argument to specify the changeset:
svn merge -c -123 apple.py
The -c -ARG in this construct translates to -r ARG:ARG-1. Note the minus in front of the ARG: -c ARG translates to -r ARG-1:ARG, which is not what we need here.
Another possibility is using revision keywords:
svn merge -r COMMITTED:PREV apple.py
Note that this undoes the last commit, while the previous commands let you specify the changeset you want to undo.
http://stefaanlippens.net/svn_undo_commit
pokud chceme úplně celý repozitář, dá se použít
svn merge -r [current_version]:[previous_version] [repository_url]