public
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
francois (author)
Fri May 09 06:56:17 -0700 2008
commit  b78d52bb13bc707c6af3eecd7a02a67d8f8ffd19
tree    75ee16aa7b6817958ab0264c021ced9987fcb53d
parent  29185f5c30acfc9ab36f661bd44d1429e0e8d336
piston / samples / import_svn_svn.rb
100644 25 lines (20 sloc) 0.571 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env ruby
#
# Import an SVN repository into an SVN working copy.
require File.dirname(__FILE__) + "/common"
 
@root = @root + "tmp/svn_svn"
@root.rmtree rescue nil
@root.mkpath
 
@repos = @root + "repos"
@wc = @root + "wc"
@tmp = @root + "xlsuite.tmp"
 
svnadmin :create, @repos
svn :checkout, "file://#{@repos.realpath}", @wc
 
repos = Piston::Svn::Repository.new("http://svn.xlsuite.org/trunk/lib")
rev = repos.at(:head)
rev.checkout_to(@tmp)
wc = Piston::Svn::WorkingCopy.new(@wc + "tmp")
wc.create
wc.copy_from(rev)
wc.remember(rev.remember_values)
wc.finalize