Public
snipts » svn
showing 1-20 of 64 snipts for svn
-
∞ Remove .svn files from a directory
find . -name ".svn" -exec rm -rf {} \;
-
∞ Correct permissions for svn files in project
find -name .svn -exec sudo chmod 777 {} \; find $(find -name .svn) -type d -exec sudo chmod 777 {} \; find $(find -name .svn) ! -type d -exec sudo chmod 664 {} \;
-
∞ install svn on shared host
#Install subversion on a shared host curl -O http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz curl -O http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.gz curl -O http://www.openssl.org/source/openssl-0.9.8l.tar.gz tar zxvf openssl-0.9.8l.tar.gz tar zxvf subversion-1.6.9.tar.gz tar zxvf subversion-deps-1.6.9.tar.gz cd openssl-0.9.8l/ ./config shared --prefix=$HOME/installs && make clean && make && make install cd ../ export CFLAGS="-O2 -g -I$HOME/installs/include" export LDFLAGS="-L$HOME/installs/lib" export CPP="gcc -E -I$HOME/installs/include" cd subversion-1.6.9/neon/ ./configure --with-ssl=openssl --prefix=$HOME/installs cd ../ ./configure --with-ssl --prefix=$HOME/installs --with-neon=$HOME/installs/bin/neon-config make clean && make && make install echo 'store-plaintext-passwords=no' >> ~/.subversion/servers
-
∞ Copy all .svn directories recursively to /tmp/svn with their dir structure
find -name .svn -print | xargs -n1 -i cp -R --parents {} /tmp/svn -
∞ clean local copy from SVN symfony project
1 create batch_local.txt file in project folder with this content for DIR in `find -name sql -type d`; do svn propset svn:ignore '*' $DIR/; done; for DIR in `find -name log -type d`; do svn propset svn:ignore '*' $DIR/; done; for DIR in `find -name cache -type d`; do svn propset svn:ignore '*' $DIR/; done; for DIR in `find -name base -type d`; do svn propset svn:ignore '*' $DIR/; done; for DIR in `find -name om -type d`; do svn propset svn:ignore '*' $DIR/; done; for DIR in `find -name map -type d`; do svn propset svn:ignore '*' $DIR/; done; svn commit -m 'change svn properties' svn status 2 $chmod +x batch_local.txt 3 $./batch_local.txt
-
∞ clean copy of symfony project for trac by using batch command
1 create batch_trac.txt in project folder with this content mv config/databases.yml config/databases.yml.sample; mv config/ProjectConfiguration.class.php config/ProjectConfiguration.class.php.sample; rm -rf cache/* log/*; find -name *schema.sql -exec rm -rf {} \; for DIR in `find -name base -type d`; do rm -rf $DIR/*;done; for DIR in `find -name map -type d`; do rm -rf $DIR/*;done; for DIR in `find -name om -type d`; do rm -rf $DIR/*;done; echo Clean project sucessfully! please do not forget delete all unnecessary file in project folder, For Example: *.txt for batching 2 $chmod +x batch_trac.txt 3 $./batch_trac.txt 4 you can import these code in trac system
-
∞ remove .svn folders
find . -name ".svn" -type d -exec rm -rf {} \;
-
∞ outdated drupal module with svn
## In a nutshell, how to update a module from Drupal contrib, ## on a production site that is under revision control (subversion). # If you turn on a module (that just happens to already be # present in the list on admin/build/modules), then you MUST # 1) go to the update status page # 2) find out if the module you just turned on is up to date # 3) if it is, fine (your done! stop here), # 4) if there are updates... then go to the drupal.org site first # to see if there are any "gotchas" for the upgrade. As you'll # be turning the module on for the first time on a new site, # then you shouldnt have to worry too much. # 5) To run the updates: login via ssh ssh username@server.com # 6) go to the right folder and execute drush update cd domains/example.com/public_html/sites/all/modules drush --uri=example.com update modulename # 7) confirm that the update was successful on the site # 8) then check in the code svn commit -u username -m "updated modulename to the latest version"
-
∞ svn:ignore
svn propset svn:ignore dirname . # If you have multiple things to ignore, separate by newlines in the property value. In that case it's easier to edit the property value using an external editor: -
∞ protect svn/cvs in apache conf
# Protect revision controlled web projects. This version is # for Apache's global configuration (conf) file. Protection # can also be done if you dont have access to Apache conf, # in any directorie's .htaccess file, in which case, Apache # conf must aleady be configured to use htaccess. <DirectoryMatch "^/.*/(\.svn|CVS)/"> Order deny,allow Deny from all </DirectoryMatch>
-
∞ svn bash shortcuts
alias .s='svn stat' alias .c='svn ci -m' alias .u='svn up' alias .a='svn stat | grep "^\?" | awk "{print \$2}" | xargs svn add' alias .d='svn stat | grep "^\!" | awk "{print \$2}" | xargs svn delete'
-
∞ divide and conquer svn repo
# The following structure exists: # # originalrepository/ # project_name/ # trunk/ # branches/ # tags/ # # I want to move it to its *own* repository and give the following structure: # # newrepositoryname/ # trunk/ # branches/ # tags/ # export LOCAL='file:/' export SVN_DIR='/home/bluespark/svn' export SVN_OLD_REPO='originalrepository' export SVN_PROJ='project_name' export SVN_REPO='newrepositoryname' cd $SVN_DIR ## Create dumps mkdir $SVN_DIR/dumps svnadmin dump $SVN_OLD_REPO > dumps/$SVN_OLD_REPO.dump ## Filter the specific project_name out of the dump svndumpfilter include $SVN_PROJ \ --drop-empty-revs \ --preserve-revprops \ --renumber-revs \ < dumps/$SVN_OLD_REPO.dump \ > dumps/$SVN_PROJ.dump ## Create the new repository... ## NOTE: You may need to do this step in the cpanel!! ## Here is how to do it on the comand line: # svnadmin create $SVN_DIR/$SVN_REPO ## Load the new repository with the contents of the ## filtered dump file. svnadmin load $SVN_REPO < dumps/$SVN_PROJ.dump ## Move the contens of the project_name to the repo root. svn mv $LOCAL/$SVN_DIR/$SVN_REPO/$SVN_PROJ/branches \ $LOCAL/$SVN_DIR/$SVN_REPO/$SVN_PROJ/tags \ $LOCAL/$SVN_DIR/$SVN_REPO/$SVN_PROJ/trunk \ $LOCAL/$SVN_DIR/$SVN_REPO/ \ -m "moved $SVN_PROJ contents to root" ## Delete the old (empty) project directory. ## Note: you need to make sure the directory ## is really empty before deleting! svn del $SVN_DIR/$SVN_REPO/$SVN_PROJ -m "removed old project directory"
-
∞ update drupal from subversion tags
# Update a Drupal minor revision using a patch file. # Creating a patch file between cvs tags on the server proved to be # impossible. I've found a way to do this with a subversion mirror # of Drupal core. cd ~/path/to/local/drupal # What is current version of Drupal? cat CHANGELOG.txt | grep Drupal | head -1 ## Drupal 6.13, 2009-07-01 # I'm using a Subversion mirror of Drupal core to create the patch. # (Thanks to the guys at subversible.com!) svn diff http://subversible.com/svn/drupal/tags/DRUPAL-6-13 \ http://subversible.com/svn/drupal/tags/DRUPAL-6-14 > d6-14.patch # The local version of drupal was created from a tarball, and the date # format inside the $Id$ (from CVS) is: YYYY/mm/dd HH:MM:SS, but in the # subversion patch it was YYYY-mm-dd HH:MM:SS. So I had to this quick # find/replace in order to get the patch to apply cleanly. perl -pi -e 's/(\d{4})-(\d{2})-(\d{2})\s(\d{2})/\1\/\2\/\3 \4/g' d6-14.patch # Check to see if you have any outstanding uncommitted local changes. If # there are some changes then execute the commit (commented out below). svn status #svn commit -m "latest changes prior to drupal core update" # Apply the patch. The patch from svn diff command should be in # unified diff format (-u) and the paths should be taken as they are so # files in subfolders are matched (-p0). patch -p0 -u <d6-14.patch #dont forget to commit the updates... svn commit -m "updated core drupal" #optionally, tag the updated code in the repository
-
∞ Enable automatic revision control for SVN on any client/IDE
# Enable automatic revision control for SVN on any client/IDE like Coda (Mac) or others. # This means that you can include copyrights in your files and # SVN will make sure it revises the files accordingly if you use the $id$ variable within them. # Add the following lines right at the bottom of the SVN config file located in: # ~/.subversion/config (Mac/Linux) [miscellany] enable-auto-props = yes [auto-props] # Scriptish formats *.bat = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain *.bsh = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-beanshell *.cgi = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain *.cmd = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain *.js = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/javascript *.php = svn:eol-style=native; svn:keywords=Id Rev Date; svn:mime-type=text/x-php *.pl = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl; svn:executable *.pm = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl *.py = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-python; svn:executable *.sh = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-sh; svn:executable # Image formats *.bmp = svn:mime-type=image/bmp *.gif = svn:mime-type=image/gif *.ico = svn:mime-type=image/ico *.jpeg = svn:mime-type=image/jpeg *.jpg = svn:mime-type=image/jpeg *.png = svn:mime-type=image/png *.tif = svn:mime-type=image/tiff *.tiff = svn:mime-type=image/tiff # Data formats *.pdf = svn:mime-type=application/pdf *.avi = svn:mime-type=video/avi *.doc = svn:mime-type=application/msword *.eps = svn:mime-type=application/postscript *.gz = svn:mime-type=application/gzip *.mov = svn:mime-type=video/quicktime *.mp3 = svn:mime-type=audio/mpeg *.ppt = svn:mime-type=application/vnd.ms-powerpoint *.ps = svn:mime-type=application/postscript *.psd = svn:mime-type=application/photoshop *.rtf = svn:mime-type=text/rtf *.swf = svn:mime-type=application/x-shockwave-flash *.tgz = svn:mime-type=application/gzip *.wav = svn:mime-type=audio/wav *.xls = svn:mime-type=application/vnd.ms-excel *.zip = svn:mime-type=application/zip # Text formats .htaccess = svn:mime-type=text/plain *.css = svn:mime-type=text/css *.dtd = svn:mime-type=text/xml *.html = svn:mime-type=text/html *.ini = svn:mime-type=text/plain *.sql = svn:mime-type=text/x-sql *.txt = svn:mime-type=text/plain *.xhtml = svn:mime-type=text/xhtml+xml *.xml = svn:mime-type=text/xml *.xsd = svn:mime-type=text/xml *.xsl = svn:mime-type=text/xml *.xslt = svn:mime-type=text/xml *.xul = svn:mime-type=text/xul *.yml = svn:mime-type=text/plain CHANGES = svn:mime-type=text/plain COPYING = svn:mime-type=text/plain INSTALL = svn:mime-type=text/plain Makefile* = svn:mime-type=text/plain README = svn:mime-type=text/plain TODO = svn:mime-type=text/plain # Code formats *.c = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain *.cpp = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain *.h = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain *.java = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain *.as = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain *.mxml = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
-
∞ svn mini howto
SVN, the first steps – A Mini HowTo for n00bs! Posted by: technofreak on: August 13, 2006 * In: Linux and FLOSS| Programming Gimmicks| Techy Tips and Tweaks| Upgradations and Installations * Comment! I had to deal with teaching a few Linux n00bs on how to start with SVN. Though my last post deals with using the SVN basically, it missed one big point which I perhaps myself learnt today – How to create a reposiroty and start with a working copy. I agree, I had difficulty over creating a repository though I very well know how to work on a working copy. This day, I had more things to learn and especially to find a list of things to be learned. Thus, I wrote a simple step-by-step howto for those who haven’t tried their hands on SVN before. As usual, I blog them too therefore someday when I myself couldn’t figure out how to do things, I can look at my own blog (Which I did today while dealing with MySQL). Here goes my mini how-to for noobs on SVN…. Procedure to Create a Repository using SVN and basic operations with Subversion: Step1. Create a repositry named mysvn in your home directory (assuming your shell’s current directory is your home, which is by default), noob@dapper:~$ svnadmin create mysvn Step1(b). Check whether your repository is created in the intended location, noob@dapper:~$ ls Apps Django-0.95 GNUstep Collections Documents Linux Music confman Downloads LUG mysvn WorkSpace Desktop Step2. Create a directory called code in your home, crate 3 sub-directories under it namely branches, logs and trunk. If you have some files to be placed, place it in the ‘trunk’ sub-directory. noob@dapper:~$ mkdir ./code noob@dapper:~$ mkdir ./code/branches noob@dapper:~$ mkdir ./code/logs noob@dapper:~$ mkdir ./code/trunk noob@dapper:~$ ls ./code/ branches logs trunk Step3. Now, import your newly created directory, named code to the repository using the SVN’s import command as follows, noob@dapper:~$ svn import ./code file:///home/noob/mysvn/code -m ‘Initial Import’ Adding code/trunk Adding code/trunk/testfile.txt Adding code/logs Adding code/branches Committed revision 1. Step3(b) This will add an invisible directory named code in the repos, though you cannot see them by getting into mysvn repos direcotry manually from FileManager or so. Don’t worry. Step4. Checkout the newly created project in the repos, namely code, thereby cretaing a working copy in local filesystem. (may be in the same name or a slightly different name like mycode) noob@dapper:~$ svn co file:///home/noob/mysvn/code code A code/trunk A code/trunk/testfile.txt A code/logs A code/branches Checked out revision 1. Step5. Now, change the content of any file in the local working copy under trunk and save the file. Now a file in your working copy is changed and lets have some fun with svn :) Step6. Lets check the difference between the file in the repository and the local working copy, as we have made a change. The changes will the printed on the terminal, where a + denotes addition and – dentoes deletion or change. noob@dapper:~$ cd code/ noob@dapper:~/code$ svn diff Index: trunk/testfile.txt =================================================================== — trunk/testfile.txt (revision 1) +++ trunk/testfile.txt (working copy) @@ -1,3 +1,6 @@ -This is a test text file. This file is intended to be moved to local +8.20 PM: This is a test text file. This file is intended to be moved to local repository (not working copy) named ‘mysvn’ under the project ‘code’. Hope everything works fine :) + +8.25 PM: Repository creation successful. Added files to repos and created a +local working copy of the same name. Step7. The change is found. Now as we have a modified working copy, we need to commit the changes so it gets updated int he repository as well. noob@dapper:~/code$ svn commit -m ‘changed text contents’ Sending trunk/testfile.txt Transmitting file data . Committed revision 2. Step8. Update your working copy so that you get the laest revision in your working directory. noob@dapper:~/code$ svn update At revision 2. Note: #1. This procedure is for creating a repository in your local machine, as well as the working copy in the same machine. This is a simple example of how to do the basic things. Read the SVN documentation available in the SVN’s official web site. #2. Did you see, when we added the files from code folder using an import command, the revision changed to ‘revision 1? from the initial ‘revision 0? (sorry, how did i miss the output which showed revision 0 ?? :( ). And check again, when we did a ‘commit’ at step7, the revision again got updated to ‘revision 2?. Wow! It’s cool, isn’t it ?! :D *********************Licence******************************************* This work was created by Parthan.S.R. on 13th August, 2006. Parthan can be contacted at parth.technofreak@gmail.com This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit tp://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Possibly related posts: (automatically generated) * Subversion – A Scoop of it! * Setting up a SVN repository and working copy * svnserve the people * Using Google code as a repository Tags: howto, newbie, subversion, svn, tutorial -
∞ SVN add all new files (not fully tested)
svn status | grep "?" | sed s/'\?\s*'// > to-add svn add --targets to-add
-
∞ SVN Delete mergeinfo on tree except root (the merge target)
svn propdel --recursive svn:mergeinfo ./*
-
∞ Delete merge info tag
svn propdel svn:mergeinfo "location" -
∞ get all SVN merge info
svn propget svn:mergeinfo --recursive
-
∞ .bashrc for multiuser account
TTY=`ps |head -n 2|tail -n 1|awk '{print $2}'` RIP=`w|grep $TTY|awk '{print $3}'` case $RIP in 10.0.100.162 ) export EDITOR=joe ;; * ) export EDITOR=nano ;; esac



CSS Mastery: Advanced Web Standards Solutions