スキップしてメイン コンテンツに移動

投稿

ラベル(svn)が付いた投稿を表示しています

Bash Script for Back Up Files to Subversion

Introduction There are 2 ways to control files on multiple machines in the software development world. Deploy or build file from version control system Backup files to version control system In my opinion, ideally, everything should be done by the way 1 because it ensures the files are same across the all machines. However in the real world, sometime it is hard to deploy all files from version control system because of the various reasons - such as linux/unix permission or organization structure or too difficult to automating deployment or etc. etc.... In that case, we should take the way 2. In this post, I will introduce simple bash script for back up files to Subversion. Of course you can use your favorite version control system such as Git instead of Subversion ;) If you are a software developer, you can easily refine my bash script and create git version quickly ;) Bash Script for Back Up Files to Subversion See below script! You just save the script and simply execut

Set Specific Revision Number for SVN External

Sometimes, You might want to set revision number for svn-external repository explicitly. In that case, you should just set svn-external with "-rXXXX" on your svn property (XXXX is the revision number you want to set)! I confimred it worked perfectly on windows, linux svn client. lib -rXXXX [svn-external target url]

Creating SVN Tag in Bash

In this post, I will show you an example bash script for creating svn tag. First, if you would like to create tag on svn, you simply execute the following command. svn copy 'source_url' 'tag_url' Okay then, we simply call the above command in bash script. I use revision number and time stamp as tag name. Instead of using revision number, maybe you can prepare version number file and count up it when creating tag. #!/bin/bash SVN_USERNAME=dukesoftware SVN_PASSWORD=some_password SVN_INFO_COMMAND="svn info --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive" SVN_COPY_COMMAND="svn copy --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive" svn_project_trunk="http://somewhere.svn/project/trunk" svn_project_base=${svn_project_trunk/trunk/} # Getting revision from svn info command # Need this line for displaying message of svn info command in English forcibly. export LC_MESSAGES=C revision=`$SVN_INFO_CO

Taking Diff bewteen Two Repositories

I wrote a bash script for taking diffs between two repositories. #!/bin/bash SVN_USERNAME=dukesoftware SVN_PASSWORD=some_password SVN_COMMON_COMMAND="svn --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive --ignore-externals --quiet" SVN_COMMON_UPDATE_COMMAND="$SVN_COMMON_COMMAND update --set-depth infinity" SVN_COMMON_CHECKOUT_COMMAND="$SVN_COMMON_COMMAND co --depth immediates" SVN_BASE_URL=http://svn.repository.dummy.com/projects/ # comparison svn urls SVN_URL1=$SVN_BASE_URL/url1 SVN_URL2=$SVN_BASE_URL/url2 DIR1=target1 DIR2=target2 OUTPUT_DIR=diff_out EXCLUDE_FILES=(".svn" "jquery-*.min.js") # To minimize number of checkout files, set below constants CHECKOUT_DIRS=("dir1" "dir2" "lib") DIFF_TARGETS=("dir1/sub1" "dir1/sub2" "dir2" "lib") # function definitions build_base_diff_command(){ DIFF_BASE_COMMAND="diff -E -B -b -u -r" fo

Get Useful SVN info in Ant

Hello there! I am trying to get svn info from Ant. I think there are two ways. SvnAnt Execute SVN command and extract information on Ant I've tried first option - SvnAnt but there is an issue for me. I need to pick up proper version of JavaHL based on Subversion client version installed on machine. Since I would like to shared the ant script between Windows and Linux box, it's a bit pain for me to switch the JavaHL in my Ant script. So I decided to go for second option. This method is really straight forward but a bit hack. The advantage of this method is it works at least svn command is available on your machine and it doesn't depend on svn client version. The disadvantage is it really depends on svn info output string e.g. it's design for human readability, not designed for API. Anyway, here is the example for getting svn revision and set it to build.current.revision property. What this target do is redirecting svn info output and extracting revision li

Visual Studioで使えるPlugin

有償のものもあるので、ご注意。。。 SVN ankhsvn オープンソースのサブバージョンプラグイン。 第1回 Subversionを利用したイケてる.NET開発 が参考になります。Visual StudioのExpress Editionではプラグインをインストールできないので使えません。 VisualSVN SVN plug-in 未分類 ReShaper : JetBrains のVisual Stusio用アドイン