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:
New integration tests.

Only svn/svn import at the moment.
francois (author)
Sat Mar 22 19:27:55 -0700 2008
commit  c81aa59f7c99f22b181a27899af6a9eb7944bb91
tree    12f45dc2727824bfbcc42847814522978fee46c3
parent  5974519381b76cb2e8ad4334f4d9f8682ae6f3fd
...
7
8
9
 
 
 
 
 
 
 
10
...
7
8
9
10
11
12
13
14
15
16
17
0
@@ -7,5 +7,12 @@
0
     t.verbose = true
0
     t.warning = true
0
   end
0
+
0
+ Rake::TestTask.new("integration") do |t|
0
+ t.libs << "test"
0
+ t.test_files = FileList['test/integration/**/test_*.rb']
0
+ t.verbose = true
0
+ t.warning = true
0
+ end
0
 end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
0
@@ -1 +1,41 @@
0
+require File.dirname(__FILE__) + "/../test_helper"
0
+require File.dirname(__FILE__) + "/../integration_helpers"
0
+
0
+class TestImportSvnSvn < Test::Unit::TestCase
0
+ attr_reader :repos_path, :wc_path
0
+
0
+ def setup
0
+ @repos_path = PISTON_ROOT + "tmp/import_real/repos"
0
+ @wc_path = PISTON_ROOT + "tmp/import_real/wc"
0
+
0
+ repos_path.parent.rmtree rescue nil
0
+ repos_path.parent.mkpath
0
+ end
0
+
0
+ def teardown
0
+ repos_path.parent.rmtree rescue nil
0
+ end
0
+
0
+ def test_import
0
+ svnadmin :create, repos_path
0
+ svn :checkout, "file://#{repos_path}", wc_path
0
+ svn :mkdir, wc_path + "trunk", wc_path + "tags", wc_path + "branches", wc_path + "trunk/vendor"
0
+ svn :commit, wc_path, "--message", "'first commit'"
0
+ piston :import, "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement/", wc_path + "trunk/vendor/ssl_requirement"
0
+
0
+ assert_equal "A vendor/ssl_requirement
0
+A vendor/ssl_requirement/test
0
+A vendor/ssl_requirement/test/ssl_requirement_test.rb
0
+A vendor/ssl_requirement/lib
0
+A vendor/ssl_requirement/lib/ssl_requirement.rb
0
+A vendor/ssl_requirement/.piston.yml
0
+A vendor/ssl_requirement/README
0
+".split.sort, svn(:status, wc_path + "trunk/vendor/").gsub((wc_path + "trunk/").to_s, "").split.sort
0
+
0
+ info = YAML.load(File.read(wc_path + "trunk/vendor/ssl_requirement/.piston.yml"))
0
+ assert_equal 1, info["format"]
0
+ assert_equal "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement", info["handler"][Piston::Svn::ROOT]
0
+ assert_equal "5ecf4fe2-1ee6-0310-87b1-e25e094e27de", info["handler"][Piston::Svn::UUID]
0
+ end
0
+end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
0
@@ -1 +1,26 @@
0
+PISTON_ROOT = Pathname.new(File.dirname(__FILE__)).parent.realpath
0
+
0
+def runcmd(cmd, *args)
0
+ cmdline = [cmd]
0
+ cmdline += args
0
+ cmdline = cmdline.flatten.map {|s| s.to_s}.join(" ")
0
+ logger.debug "> #{cmdline}"
0
+
0
+ output = `#{cmdline}`
0
+ logger.debug "< #{output}"
0
+ return output if $?.success?
0
+ raise output
0
+end
0
+
0
+def svn(*args)
0
+ runcmd(:svn, *args)
0
+end
0
+
0
+def svnadmin(*args)
0
+ runcmd(:svnadmin, *args)
0
+end
0
+
0
+def piston(*args)
0
+ runcmd(:ruby, "-I", PISTON_ROOT + "lib", PISTON_ROOT + "bin/piston", *args)
0
+end

Comments

    No one has commented yet.