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
Moved all files into their final namespace.
francois (author)
Sat Mar 15 08:15:20 -0700 2008
commit  8fa47bfd99e7e4c40b94feb3b4c1bc58ac952865
tree    4625b1353eef0b2a672e2553bc0f6bcdf6ce7f2a
parent  47948ed4a49f33cf951517894f85219070116a9a
...
1
2
3
4
...
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
...
 
1
2
3
...
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
0
@@ -1,4 +1,3 @@
0
-.gitignore
0
 History.txt
0
 License.txt
0
 Manifest.txt
0
@@ -8,28 +7,28 @@ bin/piston
0
 config/hoe.rb
0
 config/requirements.rb
0
 lib/piston.rb
0
+lib/piston/cli.rb
0
+lib/piston/commands.rb
0
+lib/piston/commands/base.rb
0
+lib/piston/commands/import.rb
0
+lib/piston/git.rb
0
+lib/piston/git/client.rb
0
+lib/piston/git/commit.rb
0
+lib/piston/git/repository.rb
0
+lib/piston/git/working_copy.rb
0
+lib/piston/repository.rb
0
+lib/piston/revision.rb
0
+lib/piston/svn.rb
0
+lib/piston/svn/client.rb
0
+lib/piston/svn/repository.rb
0
+lib/piston/svn/revision.rb
0
+lib/piston/svn/working_copy.rb
0
 lib/piston/version.rb
0
-lib/piston_core.rb
0
-lib/piston_core/cli.rb
0
-lib/piston_core/commands/base.rb
0
-lib/piston_core/commands/import.rb
0
-lib/piston_core/repository.rb
0
-lib/piston_core/revision.rb
0
-lib/piston_core/version.rb
0
-lib/piston_core/working_copy.rb
0
-lib/piston_git.rb
0
-lib/piston_git/client.rb
0
-lib/piston_git/commit.rb
0
-lib/piston_git/repository.rb
0
-lib/piston_git/version.rb
0
-lib/piston_git/working_copy.rb
0
-lib/piston_svn.rb
0
-lib/piston_svn/client.rb
0
-lib/piston_svn/repository.rb
0
-lib/piston_svn/revision.rb
0
-lib/piston_svn/version.rb
0
-lib/piston_svn/working_copy.rb
0
+lib/piston/working_copy.rb
0
 log/.gitignore
0
+piston-core/log/test.log
0
+piston-git/log/test.log
0
+piston-svn/log/test.log
0
 samples/svn/import.rb
0
 script/destroy
0
 script/generate
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
15
16
17
 
...
1
 
 
 
 
 
 
 
 
 
 
 
 
 
2
3
4
 
5
0
@@ -1,17 +1,5 @@
0
 #!/usr/bin/env ruby
0
-if ENV["NOGEM"] then
0
- require "pathname"
0
- root = Pathname.new(File.dirname(__FILE__)).parent
0
- $:.unshift((root + "lib").realpath)
0
- $:.unshift((root + "../piston-core/lib").realpath)
0
- $:.unshift((root + "../piston-svn/lib").realpath)
0
-else
0
- require "piston/version"
0
- gem "piston-core", "= #{Piston::VERSION::STRING}"
0
- gem "piston-svn", "= #{Piston::VERSION::STRING}"
0
- require "piston_core"
0
- require "piston_svn"
0
-end
0
+require "piston"
0
 
0
 # Chain to the real command-line client
0
-require "piston_core/cli"
0
+require "piston/cli"
...
15
16
17
18
19
20
21
 
...
15
16
17
 
 
 
 
18
0
@@ -15,7 +15,4 @@ end
0
 $:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
0
 
0
 require "piston"
0
-require "piston_core"
0
-require "piston_core/commands/import"
0
-require "piston_svn"
0
-require "piston_git"
0
+require "piston/commands"
...
1
 
 
 
 
 
 
 
 
2
3
4
5
6
 
 
 
 
 
 
...
 
1
2
3
4
5
6
7
8
9
10
 
 
11
12
13
14
15
16
17
0
@@ -1,5 +1,16 @@
0
-$:.unshift File.dirname(__FILE__)
0
+require "piston/repository"
0
+require "piston/revision"
0
+require "piston/working_copy"
0
+
0
+require "piston/git"
0
+require "piston/svn"
0
+
0
+require "pathname"
0
 
0
 module Piston
0
-
0
-end
0
\ No newline at end of file
0
+ class << self
0
+ def version_message
0
+ "Piston %s\nCopyright 2006-2008, François Beausoleil <francois@teksol.info>\nhttp://piston.rubyforge.org/\nDistributed under an MIT-like license." % Piston::VERSION::STRING
0
+ end
0
+ end
0
+end
...
9
10
11
12
 
13
14
15
...
18
19
20
21
 
22
23
24
...
9
10
11
 
12
13
14
15
...
18
19
20
 
21
22
23
24
0
@@ -9,7 +9,7 @@ class TestGitCommitCheckout < Test::Unit::TestCase
0
 
0
   def test_clones_repository_at_indicated_path
0
     @sha1 = "a9302"
0
- @commit = PistonGit::Commit.new(@repos, @sha1)
0
+ @commit = Piston::Git::Commit.new(@repos, @sha1)
0
     @commit.expects(:git).with(:clone, @repos.url, @reposdir)
0
     @commit.expects(:git).with(:checkout, "-b", "my-#{@sha1}", @sha1)
0
     Dir.expects(:chdir).with(@reposdir).yields
0
@@ -18,7 +18,7 @@ class TestGitCommitCheckout < Test::Unit::TestCase
0
 
0
   def test_cloning_head_finds_head_commit
0
     @sha1 = "HEAD"
0
- @commit = PistonGit::Commit.new(@repos, @sha1)
0
+ @commit = Piston::Git::Commit.new(@repos, @sha1)
0
     @commit.expects(:git).with(:clone, @repos.url, @reposdir)
0
     @commit.expects(:git).with(:checkout, "-b", "my-#{@sha1}", @sha1)
0
     @commit.expects(:git).with(:log, "-n", "1").returns("commit 922b12a6bcbb6f6a2cec60bcf5de17118086080a\nAuthor: Fran\303\247ois Beausoleil <francois@teksol.info>\nDate: Fri Mar 14 13:28:41 2008 -0400\n\n Changed how dependencies are found and managed, by using config/requirements.rb everywhere.\n \n Updated test/test_helper.rb where appropriate.\n")
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ class TestGitCommitEach < Test::Unit::TestCase
0
     @tmpdir = Pathname.new("tmp/.arepos.tmp.git")
0
     @tmpdir.rmtree rescue nil
0
     @tmpdir.mkdir
0
- @commit = PistonGit::Commit.new(@repos, "ab"*20)
0
+ @commit = Piston::Git::Commit.new(@repos, "ab"*20)
0
     @commit.stubs(:git).returns("commit " + "ab" * 20)
0
     @commit.checkout_to(@tmpdir)
0
   end
...
6
7
8
9
 
10
11
12
13
14
 
15
16
17
18
 
19
20
...
6
7
8
 
9
10
11
12
13
 
14
15
16
17
 
18
19
20
0
@@ -6,15 +6,15 @@ class TestGitCommitRememberance < Test::Unit::TestCase
0
     @repos.stubs(:url).returns("git://github.com/francois/arepos.git")
0
 
0
     @reposdir = Pathname.new("tmp/repos.git")
0
- @commit = PistonGit::Commit.new(@repos, "ab"*20)
0
+ @commit = Piston::Git::Commit.new(@repos, "ab"*20)
0
     @values = @commit.remember_values
0
   end
0
 
0
   def test_remembers_original_repository_url
0
- assert_equal @repos.url, @values[PistonGit::URL]
0
+ assert_equal @repos.url, @values[Piston::Git::URL]
0
   end
0
 
0
   def test_remembers_original_commit
0
- assert_equal @values[PistonGit::COMMIT], @commit.commit
0
+ assert_equal @values[Piston::Git::COMMIT], @commit.commit
0
   end
0
 end
...
2
3
4
5
 
6
7
8
9
 
10
11
12
...
2
3
4
 
5
6
7
8
 
9
10
11
12
0
@@ -2,11 +2,11 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestGitRepositoryAt < Test::Unit::TestCase
0
   def setup
0
- @repos = PistonGit::Repository.new("git://a.repos.com/project.git")
0
+ @repos = Piston::Git::Repository.new("git://a.repos.com/project.git")
0
   end
0
 
0
   def test_returns_a_piston_git_commit
0
- PistonGit::Commit.expects(:new).with(@repos, "a93029").returns(commit = mock("commit"))
0
+ Piston::Git::Commit.expects(:new).with(@repos, "a93029").returns(commit = mock("commit"))
0
     assert_equal commit, @repos.at("a93029")
0
   end
0
 end
...
2
3
4
5
 
6
7
8
9
10
 
 
11
12
13
14
15
 
 
16
17
18
19
20
 
 
21
22
...
2
3
4
 
5
6
7
8
 
 
9
10
11
12
13
 
 
14
15
16
17
18
 
 
19
20
21
22
0
@@ -2,21 +2,21 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestGitRepositoryGuessing < Test::Unit::TestCase
0
   def test_understands_git_protocol
0
- assert PistonGit::Repository.understands_url?("git://github.com/francois/piston.git")
0
+ assert Piston::Git::Repository.understands_url?("git://github.com/francois/piston.git")
0
   end
0
 
0
   def test_understand_http_when_heads_returned
0
- PistonGit::Repository.expects(:git).with("ls-remote", "--heads", "http://github.com/francois/piston.git").returns("ab"*20 + " refs/heads/master")
0
- assert PistonGit::Repository.understands_url?("http://github.com/francois/piston.git")
0
+ Piston::Git::Repository.expects(:git).with("ls-remote", "--heads", "http://github.com/francois/piston.git").returns("ab"*20 + " refs/heads/master")
0
+ assert Piston::Git::Repository.understands_url?("http://github.com/francois/piston.git")
0
   end
0
 
0
   def test_does_not_understand_http_when_no_heads
0
- PistonGit::Repository.expects(:git).with("ls-remote", "--heads", "http://github.com/francois/piston.git").returns("")
0
- deny PistonGit::Repository.understands_url?("http://github.com/francois/piston.git")
0
+ Piston::Git::Repository.expects(:git).with("ls-remote", "--heads", "http://github.com/francois/piston.git").returns("")
0
+ deny Piston::Git::Repository.understands_url?("http://github.com/francois/piston.git")
0
   end
0
 
0
   def test_asks_url_when_ssh_protocol
0
- PistonGit::Repository.expects(:git).with("ls-remote", "--heads", "ssh://francois@github.com/francois/piston.git").returns("ab"*20 + " refs/heads/master")
0
- assert PistonGit::Repository.understands_url?("ssh://francois@github.com/francois/piston.git")
0
+ Piston::Git::Repository.expects(:git).with("ls-remote", "--heads", "ssh://francois@github.com/francois/piston.git").returns("ab"*20 + " refs/heads/master")
0
+ assert Piston::Git::Repository.understands_url?("ssh://francois@github.com/francois/piston.git")
0
   end
0
 end
...
35
36
37
38
39
40
 
 
 
41
...
35
36
37
 
 
 
38
39
40
41
0
@@ -35,7 +35,7 @@ module Test
0
 end
0
 
0
 Pathname.new(File.dirname(__FILE__) + "/../log").mkdir rescue nil
0
-PistonCore::WorkingCopy.logger =
0
- PistonCore::Repository.logger =
0
- PistonCore::Commands::Base.logger =
0
+Piston::WorkingCopy.logger =
0
+ Piston::Repository.logger =
0
+ Piston::Commands::Base.logger =
0
   Test::Unit::TestCase.logger
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestImport < Test::Unit::TestCase
0
   def setup
0
     @wc = stub_everything("working_copy")
0
- @cmd = PistonCore::Commands::Import.new
0
+ @cmd = Piston::Commands::Import.new
0
     @cmd.stubs(:debug)
0
     @cmd.stubs(:info)
0
     @cmd.stubs(:warn)
...
2
3
4
5
 
6
7
8
9
10
 
 
11
12
13
14
15
 
16
17
18
 
 
19
20
21
...
27
28
29
30
31
 
 
32
33
...
2
3
4
 
5
6
7
8
 
 
9
10
11
12
13
14
 
15
16
 
 
17
18
19
20
21
...
27
28
29
 
 
30
31
32
33
0
@@ -2,20 +2,20 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestRepositoryGuessing < Test::Unit::TestCase
0
   def setup
0
- PistonCore::Repository.send(:handlers).clear
0
+ Piston::Repository.send(:handlers).clear
0
   end
0
 
0
   def test_guess_when_no_handlers_raises
0
- assert_raise PistonCore::Repository::UnhandledUrl do
0
- PistonCore::Repository.guess("http://")
0
+ assert_raise Piston::Repository::UnhandledUrl do
0
+ Piston::Repository.guess("http://")
0
     end
0
   end
0
 
0
   def test_guess_asks_each_handler_in_turn
0
- PistonCore::Repository.add_handler(handler = mock("handler"))
0
+ Piston::Repository.add_handler(handler = mock("handler"))
0
     handler.expects(:understands_url?).with("http://a.repos.com/trunk").returns(false)
0
- assert_raise PistonCore::Repository::UnhandledUrl do
0
- PistonCore::Repository.guess("http://a.repos.com/trunk")
0
+ assert_raise Piston::Repository::UnhandledUrl do
0
+ Piston::Repository.guess("http://a.repos.com/trunk")
0
     end
0
   end
0
 
0
@@ -27,7 +27,7 @@ class TestRepositoryGuessing < Test::Unit::TestCase
0
     handler_instance = mock("handler_instance")
0
     handler.expects(:new).with(url).returns(handler_instance)
0
 
0
- PistonCore::Repository.add_handler handler
0
- assert_equal handler_instance, PistonCore::Repository.guess(url)
0
+ Piston::Repository.add_handler handler
0
+ assert_equal handler_instance, Piston::Repository.guess(url)
0
   end
0
 end
...
2
3
4
5
 
6
7
8
9
 
10
11
12
...
2
3
4
 
5
6
7
8
 
9
10
11
12
0
@@ -2,11 +2,11 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestSvnRepositoryAt < Test::Unit::TestCase
0
   def setup
0
- @repos = PistonSvn::Repository.new("http://bla.com/svn/repos/trunk")
0
+ @repos = Piston::Svn::Repository.new("http://bla.com/svn/repos/trunk")
0
   end
0
 
0
   def test_instantiate_revision_at_head
0
- PistonSvn::Revision.expects(:new).with(@repos, "HEAD").returns(:newrev)
0
+ Piston::Svn::Revision.expects(:new).with(@repos, "HEAD").returns(:newrev)
0
     assert_equal :newrev, @repos.at(:head)
0
   end
0
 end
...
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
...
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
0
@@ -2,38 +2,38 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestSvnRepositoryGuessing < Test::Unit::TestCase
0
   def test_guesses_with_svn_protocol
0
- assert PistonSvn::Repository.understands_url?("svn://a.host.com/")
0
+ assert Piston::Svn::Repository.understands_url?("svn://a.host.com/")
0
   end
0
 
0
   def test_guesses_with_svn_plus_bla_protocol
0
- assert PistonSvn::Repository.understands_url?("svn+bla://username@a.host.com/")
0
+ assert Piston::Svn::Repository.understands_url?("svn+bla://username@a.host.com/")
0
   end
0
 
0
   def test_guesses_with_svn_plus_ssh_protocol
0
- assert PistonSvn::Repository.understands_url?("svn+ssh://username@a.host.com/")
0
+ assert Piston::Svn::Repository.understands_url?("svn+ssh://username@a.host.com/")
0
   end
0
 
0
   def test_contacts_repository_for_file_protocol
0
     url = "file:///home/username/svn/projects/trunk"
0
- PistonSvn::Repository.expects(:svn).with(:info, url).returns("Repository UUID: abcdef\n")
0
- assert PistonSvn::Repository.understands_url?(url)
0
+ Piston::Svn::Repository.expects(:svn).with(:info, url).returns("Repository UUID: abcdef\n")
0
+ assert Piston::Svn::Repository.understands_url?(url)
0
   end
0
 
0
   def test_contacts_repository_for_http_protocol
0
     url = "http://svn.collab.net/repos/svn/trunk"
0
- PistonSvn::Repository.expects(:svn).with(:info, url).returns("Repository UUID: abcdef\n")
0
- assert PistonSvn::Repository.understands_url?(url)
0
+ Piston::Svn::Repository.expects(:svn).with(:info, url).returns("Repository UUID: abcdef\n")
0
+ assert Piston::Svn::Repository.understands_url?(url)
0
   end
0
 
0
   def test_says_does_not_understand_when_svn_info_errors_out
0
     url = "http://rubyonrails.org/"
0
- PistonSvn::Repository.expects(:svn).with(:info, url).raises(PistonSvn::Client::Failed)
0
- deny PistonSvn::Repository.understands_url?(url)
0
+ Piston::Svn::Repository.expects(:svn).with(:info, url).raises(Piston::Svn::Client::Failed)
0
+ deny Piston::Svn::Repository.understands_url?(url)
0
   end
0
 
0
   def test_says_does_not_understand_when_svn_command_not_found
0
     url = "http://rubyonrails.org/"
0
- PistonSvn::Repository.expects(:svn).with(:info, url).raises(PistonSvn::Client::BadCommand)
0
- deny PistonSvn::Repository.understands_url?(url)
0
+ Piston::Svn::Repository.expects(:svn).with(:info, url).raises(Piston::Svn::Client::BadCommand)
0
+ deny Piston::Svn::Repository.understands_url?(url)
0
   end
0
 end
...
22
23
24
25
 
26
27
...
22
23
24
 
25
26
27
0
@@ -22,6 +22,6 @@ class TestSvnRevisionCheckout < Test::Unit::TestCase
0
 
0
   private
0
   def new_revision(revision)
0
- PistonSvn::Revision.new(@repos, revision)
0
+ Piston::Svn::Revision.new(@repos, revision)
0
   end
0
 end
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@ class TestSvnRevisionEach < Test::Unit::TestCase
0
 
0
     @wcdir = Pathname.new("tmp/.wc.tmp")
0
 
0
- @rev = PistonSvn::Revision.new(@repos, "HEAD")
0
+ @rev = Piston::Svn::Revision.new(@repos, "HEAD")
0
     @rev.stubs(:svn).returns("Checked out revision 111.\n")
0
     @rev.checkout_to(@wcdir)
0
   end
...
26
27
28
29
 
30
31
32
33
34
35
 
36
37
38
39
40
41
 
42
43
44
45
46
 
47
48
...
26
27
28
 
29
30
31
32
33
34
 
35
36
37
38
39
40
 
41
42
43
44
45
 
46
47
48
0
@@ -26,23 +26,23 @@ class TestSvnRevisionRememberance < Test::Unit::TestCase
0
   def test_remembers_repos_uuid
0
     rev = new_revision("HEAD")
0
     rev.expects(:svn).with(:info, "--revision", "HEAD", @repos.url).returns(@info.to_yaml)
0
- assert_equal "some-long-uuid", rev.remember_values[PistonSvn::UUID]
0
+ assert_equal "some-long-uuid", rev.remember_values[Piston::Svn::UUID]
0
   end
0
 
0
   def test_remembers_repos_url
0
     rev = new_revision("HEAD")
0
     rev.expects(:svn).with(:info, "--revision", "HEAD", @repos.url).returns(@info.to_yaml)
0
- assert_equal @repos.url, rev.remember_values[PistonSvn::ROOT]
0
+ assert_equal @repos.url, rev.remember_values[Piston::Svn::ROOT]
0
   end
0
 
0
   def test_remembers_repos_revision
0
     rev = new_revision("HEAD")
0
     rev.expects(:svn).with(:info, "--revision", "HEAD", @repos.url).returns(@info.to_yaml)
0
- assert_equal "9283", rev.remember_values[PistonSvn::REMOTE_REV]
0
+ assert_equal "9283", rev.remember_values[Piston::Svn::REMOTE_REV]
0
   end
0
 
0
   private
0
   def new_revision(revision)
0
- PistonSvn::Revision.new(@repos, revision)
0
+ Piston::Svn::Revision.new(@repos, revision)
0
   end
0
 end
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestSvnWorkingCopyCopying < Test::Unit::TestCase
0
   def setup
0
     @wcdir = Pathname.new("tmp/wc")
0
- @wc = PistonSvn::WorkingCopy.new(@wcdir)
0
+ @wc = Piston::Svn::WorkingCopy.new(@wcdir)
0
     @wc.stubs(:svn)
0
     @wc.stubs(:svn).with(:info, anything).returns("a:b")
0
   end
...
3
4
5
6
 
7
8
9
...
19
20
21
22
 
23
24
25
...
3
4
5
 
6
7
8
9
...
19
20
21
 
22
23
24
25
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestSvnWorkingCopyCreation < Test::Unit::TestCase
0
   def setup
0
     @wcdir = Pathname.new("tmp/wc")
0
- @wc = PistonSvn::WorkingCopy.new(@wcdir)
0
+ @wc = Piston::Svn::WorkingCopy.new(@wcdir)
0
     @wc.stubs(:svn)
0
     @wc.stubs(:svn).with(:info, anything).returns("a:b")
0
   end
0
@@ -19,7 +19,7 @@ class TestSvnWorkingCopyCreation < Test::Unit::TestCase
0
 
0
   def test_create_sets_local_revision
0
     @wc.expects(:svn).with(:info, @wcdir.parent).returns("Last Changed Rev: 1321\n")
0
- @wc.expects(:svn).with(:propset, PistonSvn::LOCAL_REV, 1321, @wcdir)
0
+ @wc.expects(:svn).with(:propset, Piston::Svn::LOCAL_REV, 1321, @wcdir)
0
     @wc.create
0
   end
0
 end
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestSvnWorkingCopyExistence < Test::Unit::TestCase
0
   def setup
0
     @wcdir = Pathname.new("tmp/wc")
0
- @wc = PistonSvn::WorkingCopy.new(@wcdir)
0
+ @wc = Piston::Svn::WorkingCopy.new(@wcdir)
0
   end
0
 
0
   def teardown
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestSvnWorkingCopyFinalization < Test::Unit::TestCase
0
   def setup
0
     @wcdir = Pathname.new("tmp/wc")
0
- @wc = PistonSvn::WorkingCopy.new(@wcdir)
0
+ @wc = Piston::Svn::WorkingCopy.new(@wcdir)
0
   end
0
 
0
   def teardown
...
6
7
8
9
10
 
 
11
12
13
14
15
 
 
16
17
...
6
7
8
 
 
9
10
11
12
13
 
 
14
15
16
17
0
@@ -6,12 +6,12 @@ class TestSvnWorkingCopyGuessing < Test::Unit::TestCase
0
   end
0
 
0
   def test_does_svn_info_on_directory
0
- PistonSvn::WorkingCopy.expects(:svn).with(:info, @dir).returns("Path: xxx\n")
0
- assert PistonSvn::WorkingCopy.understands_dir?(@dir)
0
+ Piston::Svn::WorkingCopy.expects(:svn).with(:info, @dir).returns("Path: xxx\n")
0
+ assert Piston::Svn::WorkingCopy.understands_dir?(@dir)
0
   end
0
 
0
   def test_denies_when_svn_not_available
0
- PistonSvn::WorkingCopy.expects(:svn).with(:info, @dir).raises(PistonSvn::Client::BadCommand)
0
- deny PistonSvn::WorkingCopy.understands_dir?(@dir)
0
+ Piston::Svn::WorkingCopy.expects(:svn).with(:info, @dir).raises(Piston::Svn::Client::BadCommand)
0
+ deny Piston::Svn::WorkingCopy.understands_dir?(@dir)
0
   end
0
 end
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + "/test_helper"
0
 class TestSvnWorkingCopyRememberance < Test::Unit::TestCase
0
   def setup
0
     @wcdir = Pathname.new("tmp/wc")
0
- @wc = PistonSvn::WorkingCopy.new(@wcdir)
0
+ @wc = Piston::Svn::WorkingCopy.new(@wcdir)
0
     @wc.stubs(:svn)
0
     @wc.stubs(:svn).with(:info, anything).returns("a:b")
0
   end
...
2
3
4
5
 
6
7
8
9
10
11
 
 
12
13
14
15
16
 
17
18
19
 
 
20
21
22
...
26
27
28
29
30
 
 
31
32
...
2
3
4
 
5
6
7
8
9
 
 
10
11
12
13
14
15
 
16
17
 
 
18
19
20
21
22
...
26
27
28
 
 
29
30
31
32
0
@@ -2,21 +2,21 @@ require File.dirname(__FILE__) + "/test_helper"
0
 
0
 class TestWorkingCopyGuessing < Test::Unit::TestCase
0
   def setup
0
- PistonCore::WorkingCopy.send(:handlers).clear
0
+ Piston::WorkingCopy.send(:handlers).clear
0
     @dir = Pathname.new("tmp/wc")
0
   end
0
 
0
   def test_guess_when_no_handlers_raises
0
- assert_raise PistonCore::WorkingCopy::UnhandledWorkingCopy do
0
- PistonCore::WorkingCopy.guess(@dir)
0
+ assert_raise Piston::WorkingCopy::UnhandledWorkingCopy do
0
+ Piston::WorkingCopy.guess(@dir)
0
     end
0
   end
0
 
0
   def test_guess_asks_each_handler_in_turn
0
- PistonCore::WorkingCopy.add_handler(handler = mock("handler"))
0
+ Piston::WorkingCopy.add_handler(handler = mock("handler"))
0
     handler.expects(:understands_dir?).with(@dir).returns(false)
0
- assert_raise PistonCore::WorkingCopy::UnhandledWorkingCopy do
0
- PistonCore::WorkingCopy.guess(@dir)
0
+ assert_raise Piston::WorkingCopy::UnhandledWorkingCopy do
0
+ Piston::WorkingCopy.guess(@dir)
0
     end
0
   end
0
 
0
@@ -26,7 +26,7 @@ class TestWorkingCopyGuessing < Test::Unit::TestCase
0
     handler_instance = mock("handler_instance")
0
     handler.expects(:new).with(@dir).returns(handler_instance)
0
 
0
- PistonCore::WorkingCopy.add_handler handler
0
- assert_equal handler_instance, PistonCore::WorkingCopy.guess(@dir)
0
+ Piston::WorkingCopy.add_handler handler
0
+ assert_equal handler_instance, Piston::WorkingCopy.guess(@dir)
0
   end
0
 end

Comments

    No one has commented yet.