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:
Remember the repository's class and URL at the top level in .piston.yml.

I wanted to implement this to not have to guess the repository type again, 
while implementing piston update.
francois (author)
Thu Apr 17 10:25:53 -0700 2008
commit  7a1cadb6b18c86be4a5c798a4415c051bc255ca8
tree    4beb5ac0a1b7b780a5d6ede5f998645279ed2d30
parent  c26cf7fb64cb81a7adeb4857403ef44593c24a97
...
37
38
39
40
 
 
41
42
43
...
37
38
39
 
40
41
42
43
44
0
@@ -37,7 +37,8 @@
0
           working_copy.copy_from(revision)
0
 
0
           logger.debug {"Remembering values"}
0
- working_copy.remember({:lock => options[:lock]}, revision.remember_values)
0
+ working_copy.remember({:repository_url => repository.url, :lock => options[:lock], :repository_class => repository.class.name},
0
+ revision.remember_values)
0
 
0
           logger.debug {"Finalizing working copy"}
0
           working_copy.finalize
...
32
33
34
35
 
36
37
38
...
32
33
34
 
35
36
37
38
0
@@ -32,7 +32,7 @@
0
         end
0
 
0
         def remember_values
0
- { Piston::Git::URL => repository.url, Piston::Git::COMMIT => commit }
0
+ { Piston::Git:: Piston::Git::COMMIT => commit }
0
         end
0
 
0
         def each
...
35
36
37
38
39
40
41
...
35
36
37
 
38
39
40
0
@@ -35,7 +35,6 @@
0
         raise Failed, "Could not get 'svn info' from #{repository.url} at revision #{revision}" if str.nil? || str.chomp.strip.empty?
0
         info = YAML.load(str)
0
         { Piston::Svn::UUID => info["Repository UUID"],
0
- Piston::Svn::ROOT => info["URL"],
0
           Piston::Svn::REMOTE_REV => info["Revision"]}
0
       end
0
 
...
35
36
37
38
 
 
39
40
41
...
35
36
37
 
38
39
40
41
42
0
@@ -35,7 +35,8 @@
0
 
0
     info = YAML.load(File.read(wc_path + "vendor/attachment_fu/.piston.yml"))
0
     assert_equal 1, info["format"]
0
- assert_equal "git://github.com/technoweenie/attachment_fu.git", info["handler"][Piston::Git::URL]
0
+ assert_equal "git://github.com/technoweenie/attachment_fu.git", info["repository_url"]
0
+ assert_equal "Piston::Git::Repository", info["repository_class"]
0
 
0
     response = `git-ls-remote git://github.com/technoweenie/attachment_fu.git`
0
     head_commit = response.grep(/HEAD/).first.chomp.split(/\s+/).first
...
29
30
31
32
 
 
33
34
35
...
29
30
31
 
32
33
34
35
36
0
@@ -29,7 +29,8 @@
0
 
0
     info = YAML.load(File.read(wc_path + "trunk/vendor/attachment_fu/.piston.yml"))
0
     assert_equal 1, info["format"]
0
- assert_equal "git://github.com/technoweenie/attachment_fu.git", info["handler"][Piston::Git::URL]
0
+ assert_equal "git://github.com/technoweenie/attachment_fu.git", info["repository_url"]
0
+ assert_equal "Piston::Git::Repository", info["repository_class"]
0
 
0
     response = `git-ls-remote git://github.com/technoweenie/attachment_fu.git`
0
     head_commit = response.grep(/HEAD/).first.chomp.split(/\s+/).first
...
45
46
47
48
 
 
49
50
51
...
45
46
47
 
48
49
50
51
52
0
@@ -45,7 +45,8 @@
0
 
0
     info = YAML.load(File.read(wc_path + "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 "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement/", info["repository_url"]
0
+ assert_equal "Piston::Svn::Repository", info["repository_class"]
0
     assert_equal "5ecf4fe2-1ee6-0310-87b1-e25e094e27de", info["handler"][Piston::Svn::UUID]
0
   end
0
 end
...
36
37
38
39
 
 
40
41
42
...
36
37
38
 
39
40
41
42
43
0
@@ -36,7 +36,8 @@
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 "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement/", info["repository_url"]
0
+ assert_equal "Piston::Svn::Repository", info["repository_class"]
0
     assert_equal "5ecf4fe2-1ee6-0310-87b1-e25e094e27de", info["handler"][Piston::Svn::UUID]
0
   end
0
 end
...
10
11
12
13
14
15
16
17
18
19
...
10
11
12
 
 
 
 
13
14
15
0
@@ -10,10 +10,6 @@
0
     @values = @commit.remember_values
0
   end
0
 
0
- def test_remembers_original_repository_url
0
- assert_equal @repos.url, @values[Piston::Git::URL]
0
- end
0
-
0
   def test_remembers_original_commit
0
     assert_equal @values[Piston::Git::COMMIT], @commit.commit
0
   end
...
29
30
31
32
33
34
35
36
37
38
39
40
...
29
30
31
 
 
 
 
 
 
32
33
34
0
@@ -29,12 +29,6 @@
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[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)

Comments

    No one has commented yet.