{"id":139,"date":"2008-10-10T16:58:00","date_gmt":"2008-10-10T14:58:00","guid":{"rendered":"http:\/\/antynet.pl\/index.php\/2008\/10\/10\/svn\/"},"modified":"2010-08-24T22:43:05","modified_gmt":"2010-08-24T20:43:05","slug":"svn","status":"publish","type":"post","link":"https:\/\/www.antynet.pl\/index.php\/2008\/10\/10\/svn\/","title":{"rendered":"SVN"},"content":{"rendered":"<p>wgranie pakiet\u00f3w<br \/>instalacja cvs2svn<br \/>make install<br \/>lub<br \/>apt-get install apache2<br \/>apt-get install subversion<br \/>apt-get install libapache2-svn<br \/>dodanie grupy svn<br \/>dodanie usera na kt\u00f3rym jest apache do grupy svn<br \/>stworzenie repozytorium<br \/>zmiana grupy plik\u00f3w i katalog\u00f3w repozytorium na grup\u0119 svn i uprawnienia 770<\/p>\n<p><span style=\"font-weight: bold;\">konfiguracja w pliku httpd.conf:<\/span><\/p>\n<div class=\"console\">LoadModule dav_module \/usr\/lib\/httpd\/modules\/mod_dav.so<br \/>LoadModule dav_svn_module \/usr\/lib\/httpd\/modules\/mod_dav_svn.so<br \/>LoadModule authz_svn_module \/usr\/lib\/httpd\/modules\/mod_authz_svn.so<\/p>\n<p><location><br \/>SetOutputFilter DEFLATE<br \/>SetInputFilter DEFLATE<br \/>DAV svn<br \/>SVNParentPath \/u02\/svn_home<br \/>AuthType Basic<br \/>AuthName &#8222;Subversion repository&#8221;<br \/>AuthUserFile \/u01\/apache2\/conf\/[password_file]<br \/>Require valid-user<br \/>#SVNIndexXSLT &#8222;\/svnindex.xsl&#8221;<br \/>AuthzSVNAccessFile \/u01\/apache2\/conf\/[role_file]<br \/>SVNPathAuthz off<br \/><\/location><location> <\/p>\n<p><\/location><\/div>\n<p><span style=\"font-weight: bold;\">dopisywanie user\u00f3w:<\/span><br \/>htpasswd -mb [password_file] user password<\/p>\n<p><span style=\"font-weight: bold;\">konfiguracja pliku z rolami [role_file]:<\/span><\/p>\n<div class=\"console\">[groups]<br \/>grupa1 = user1,user2<br \/>grupa2 = user2,user3<br \/>[repozytorium:\/[katalog]<br \/>@grupa1 = rw<br \/>@grupa2 = r<br \/>user3 = rw<\/div>\n<p><\/p>\n<hr \/>\n<p><span style=\"font-weight: bold;\">migracja Z CVS DO SVN<\/span><br \/>cvs2svn &#8211;encoding cp1250 -s [sciezka_projekt_svn] [sciezka_projekt_cvs]<br \/>cvs2svn &#8211;encoding cp1250 &#8211;dumpfile [sciezka_plik_dump] [sciezka_projekt_cvs]<\/p>\n<p><span style=\"font-weight: bold;\">nowe REPOZYTORIUM<\/span><br \/>svnadmin create \/[repository_path]<\/p>\n<p><span style=\"font-weight: bold;\">import z dumpa do REPOZYTORIUM<\/span><br \/>cat [dumpfile_path] | svnadmin load [sciezka_projekt_svn] &#8211;dzia\u0142a<br \/>svnadmin load [sciezka_projekt_svn] [dumpfile_path] &#8211;mia\u0142em problemy<\/p>\n<p><span style=\"font-weight: bold;\">zmieni\u0107 prawa do repozytorium<\/span><br \/>w przypadku b\u0142\u0119du:<br \/>m:human-readable errcode=&#8221;13&#8243; Could not open the requested SVN filesystem \/m:human readable<br \/>brak jest uprawnie\u0144 do czytania przez apache<\/p>\n<hr \/>\n<p><span style=\"font-weight: bold;\">sprawdzenie LOCKS<\/span><br \/>svnadmin lslocks \/[repository_path]<\/p>\n<p><span style=\"font-weight: bold;\">usuni\u0119cie LOCKS<\/span><br \/>svn unlock &#8211;force<\/p>\n<p><span style=\"font-weight: bold;\">nowy BRANCH\/TAG<\/span><span style=\"font-weight: bold;\"> z ju\u017c istniej\u0105cego<\/span><br \/>svn copy -r [ver] http:\/\/[trunk_path] http:\/\/[new_trunk_path] -m &#8222;[komentarz]&#8221;<\/p>\n<p><span style=\"font-weight: bold;\">nowy KATALOG<\/span><br \/>svn mkdir http:\/\/[trunk_path]\/[new_dir]<\/p>\n<p><span style=\"font-weight: bold;\">dodanie KATALOGU z kompa do TRUNKA<\/span><br \/>svn import [local_dir_path] http:\/\/[trunk_path]\/[new_dir]<\/p>\n<p><span style=\"font-weight: bold;\">usuwanie KATALOGU <\/span>(zawsze mo\u017cna odtworzy\u0107)<br \/>svn delete http:\/\/[trunk_path]\/[dir]<\/p>\n<p><span style=\"font-weight: bold;\">\u015bci\u0105gni\u0119cie okre\u015blonego nr rewizji<\/span><br \/>svn checkout -r [rewizja] http:\/\/[repo_path]<br \/>svn checkout http:\/\/[trunk_path]@[rev]9814<\/p>\n<p><span style=\"font-weight: bold;\">sprawdzenie z jakiej rewizji zosta\u0142 zbudowany TAG:<\/span><br \/>svn log -v &#8211;stop-on-copy http:\/\/[tag_path]<\/p>\n<p><span style=\"font-weight: bold;\">sprawdzenie wersji na serwerze<\/span><br \/>svn status -u<\/p>\n<p>find . -perm +2000 -exec chmod 2775 {} \\;<\/p>\n<hr \/>\n<p><span style=\"font-weight: bold;\">BACKUP<\/span><br \/>svnadmin hotcopy \/[repository_path]  \/[backup_dir_path]<\/p>\n<p><span style=\"font-weight: bold;\">DUMP przepisuje repozytorium do jednego pliku z wszystkimi rewizjami <\/span><br \/>svnadmin dump \/[repository_path] [-r LOWER[:UPPER]]> [dumpfile]<br \/>#rewizje od 100 do 200<br \/>svnadmin dump \/[repository_path] -r 100:200 > [dumpfile]<\/p>\n<p><span style=\"font-weight: bold;\">wrzuca z dumpa tylko pliki okre\u015blone w path<\/span><br \/>svndumpfilter include [dumpfile] [repository_path] > [dumpfile_after]<\/p>\n<p><span style=\"font-weight: bold;\">wrzuca z dumpa wszystkie pliki za wyj\u2563tkiem wykluczonych w path<\/span><br \/>svndumpfilter exclude [dumpfile] [repository_path] > [dumpfile_after]<\/p>\n<p><span style=\"font-weight: bold;\">wci\u0105gni\u0119cie z utworzeniem nowego projektu<\/span><br \/>svnadmin create calc; svnadmin load calc<\/p>\n<p><span style=\"font-weight: bold;\"><\/span><\/p>\n<p><span style=\"font-weight: bold;\"><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>wgranie pakiet\u00f3winstalacja cvs2svnmake installlubapt-get install apache2apt-get install subversionapt-get install libapache2-svndodanie grupy svndodanie usera na kt\u00f3rym jest apache do grupy svnstworzenie repozytoriumzmiana grupy plik\u00f3w i katalog\u00f3w repozytorium na grup\u0119 svn i uprawnienia 770 konfiguracja w pliku httpd.conf: LoadModule dav_module \/usr\/lib\/httpd\/modules\/mod_dav.soLoadModule dav_svn_module \/usr\/lib\/httpd\/modules\/mod_dav_svn.soLoadModule authz_svn_module \/usr\/lib\/httpd\/modules\/mod_authz_svn.so SetOutputFilter DEFLATESetInputFilter DEFLATEDAV svnSVNParentPath \/u02\/svn_homeAuthType BasicAuthName &#8222;Subversion repository&#8221;AuthUserFile \/u01\/apache2\/conf\/[password_file]Require valid-user#SVNIndexXSLT &#8222;\/svnindex.xsl&#8221;AuthzSVNAccessFile \/u01\/apache2\/conf\/[role_file]SVNPathAuthz [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[3],"tags":[57],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-uslugi","tag-linux-svn"],"_links":{"self":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":1,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":201,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions\/201"}],"wp:attachment":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}