{"id":1642,"date":"2015-03-29T00:44:02","date_gmt":"2015-03-28T22:44:02","guid":{"rendered":"http:\/\/adrhc.go.ro\/wordpress\/?p=1642"},"modified":"2018-03-12T11:44:26","modified_gmt":"2018-03-12T09:44:26","slug":"working-with-subversion-svn","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/working-with-subversion-svn\/","title":{"rendered":"Working with subversion (SVN)"},"content":{"rendered":"<pre class=\"brush:bash shell\">\r\n#svn+ssh url examples:\r\nsvn+ssh:\/\/ssh-user@your-remote-svn-server-ip\/os-path-to-svn-repository\/project-name\r\nsvn+ssh:\/\/root@adrhc.go.ro\/i-data\/SVN-Repository\/image-processor\r\nsvn+ssh:\/\/root@adrhc.go.ro\/i-data\/SVN-Repository\/image-processor\/trunk\r\n\r\n#starting svn server\r\n#path-to-svn-repository: the value for -r svnserve's option\r\nsvnserve -d -r path-to-svn-repository --log-file \/ffp\/log\/svnserve.log\r\n\r\n#ssh-user will also be used as the Author when commiting to SVN\r\n#You'll have to use Putty pageant for authentication or\r\n#you'll be asked for password many times (for any ssh connections).\r\n\r\n#Host env var in order for Intellij IDEA to work with svn+ssh approach:\r\nset SVN_SSH=\"C:\\\\Program Files (x86)\\\\PuTTY\\\\plink.exe\"\r\n\r\n#checkout to project-name directory (automatically created)\r\nsvn co svn:\/\/localhost\/project-name\r\n\r\n#list changes and new files\r\nsvn status\r\n\r\n#list unversioned files\r\nsvn status | grep ^?\r\n\r\n#list changed files\r\nsvn status | grep ^M\r\n\r\n#add the patterns from .gitignore file to the svn ignore list for the current directory\r\nsvn propset svn:ignore -F .gitignore .\r\nsvn propedit svn:ignore . -> edit current ignore list\r\nsvn propget svn:ignore\r\n\r\n# create then checkout \"springboot\" repository:\r\ncd ~\/SVNRepoUbuntu\r\nsvnadmin create springboot\r\ncd ~\/Projects\r\nsvn co file:\/\/\/********\/SVNRepoUbuntu\/springboot\r\n\r\n# add recursively to svn\r\ncd ~\/Projects\/springboot\r\nsvn add --force --auto-props --parents --depth infinity -q .\r\nsvn status .\r\n\r\n# see http:\/\/superchlorine.com\/2013\/08\/getting-svn-to-ignore-files-and-directories\/\r\n# ignore *.class *.apk and Thumbs.db in current dir\r\nsvn propset svn:ignore -R \"*.class \r\n> *.apk \r\n> Thumbs.db\" .\r\nThe > is, of course, just my shell prompts. You don\u2019t type those in.\r\nsvn status --no-ignore\r\n\r\n# format xml\r\nxmlstarlet format --indent-tab pom.xml > pom.xml1 && rm pom.xml && mv pom.xml1 pom.xml\r\n\r\n#ERROR\r\n\tsvn commit sqlite attempt to write a readonly database\r\n#SOLUTION\r\n\tMake writable the rep-cache.db file from your svn-repository.\r\n\r\n# login with p12 file and cache user\/password:\r\n# \/****************\/.subversion\/servers\r\n[global]\r\nstore-passwords = yes\r\nstore-ssl-client-cert-pp = yes\r\nstore-plaintext-passwords = yes\r\nstore-ssl-client-cert-pp-plaintext = yes\r\nstore-auth-creds = yes\r\nssl-trust-default-ca = yes\r\nssl-client-cert-file = \/****************\/SVNclient.p12\r\nssl-client-cert-password = SVNclient.p12-password-here\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#svn+ssh url examples: svn+ssh:\/\/ssh-user@your-remote-svn-server-ip\/os-path-to-svn-repository\/project-name svn+ssh:\/\/root@adrhc.go.ro\/i-data\/SVN-Repository\/image-processor svn+ssh:\/\/root@adrhc.go.ro\/i-data\/SVN-Repository\/image-processor\/trunk #starting svn server #path-to-svn-repository: the value for -r svnserve&#8217;s option svnserve -d -r path-to-svn-repository &#8211;log-file \/ffp\/log\/svnserve.log #ssh-user will also be used as the Author when commiting to SVN #You&#8217;ll have to use Putty pageant [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/working-with-subversion-svn\/#more-1642\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Working with subversion (SVN)<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,10],"tags":[128,129],"class_list":["post-1642","post","type-post","status-publish","format-standard","hentry","category-howto","category-linux","category-programming","tag-subversion","tag-svn"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=1642"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1642\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}