Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Dr Nic Williams http://drnicwilliams.com

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Checkout a Git clone of an SVN repository in parent folder

Here is a quick executable cmd that you run inside a folder checked out with Subversion. It will clone the repository using Git into the parent folder as <projname>.git

Stick this code into ~/bin/gitify and add ~/bin to your path:

#!/usr/bin/env ruby -wKU

# get svn info location
svnurl = `svn info | grep "^URL:"`.gsub('URL: ','').chomp

# project = basename
project = File.basename(Dir.pwd)

puts cmd = "git-svn clone #{svnurl} ../#{project}.git"

`#{cmd}`

Migrate rhtml views into erb views within subversion repository

From Brandon Keepers:

To migrate rhtml views into erb views within subversion repository:

Dir.glob('app/views/**/*.rhtml').each do |file|
  puts `svn mv #{file} #{file.gsub(/\.rhtml$/, '.erb')}`
end
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS