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
Search Repo:
francois (author)
Tue Jun 03 11:19:37 -0700 2008
commit  9888c2a73df74e0f64baea2833414b402c343d40
tree    6e871529b4a6493df2c7922df3ef8825f111a1ff
parent  ae515690f61577f276fee673f9ca6277c927198d
piston / samples / import_svn_svn.rb
100644 24 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
#!/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