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:
Applied Rename Method, minor reformatting changes.
francois (author)
Mon Apr 21 13:34:21 -0700 2008
commit  68e0dba6efafb2b7ca3fb5fed3a2a1a2fee7a0ac
tree    ccb8fac7227cdd8a6c9502a5385f1122f5c83c4d
parent  ea958dd2711364eab793c135e07171c9603a23e3
...
13
14
15
16
17
 
 
18
19
20
21
 
22
23
24
 
25
26
27
28
29
30
 
31
32
33
...
67
68
69
70
 
71
72
73
...
75
76
77
78
79
80
81
...
13
14
15
 
 
16
17
18
19
20
 
21
22
23
 
24
25
 
26
27
28
 
29
30
31
32
...
66
67
68
 
69
70
71
72
...
74
75
76
 
77
78
79
0
@@ -13,21 +13,20 @@
0
         options[:repository_type]
0
       end
0
       
0
- def determine_repository(repository_url)
0
- if repository_type
0
+ def select_repository(repository_url)
0
+ if repository_type then
0
           logger.info {"Forced repository type to #{repository_type}"}
0
           repository_class_name = "Piston::#{repository_type.downcase.capitalize}::Repository"
0
           repository_class = constantize(repository_class_name)
0
- repository = repository_class.new(repository_url)
0
+ repository_class.new(repository_url)
0
         else
0
           logger.info {"Guessing the repository type"}
0
- repository = Piston::Repository.guess(repository_url)
0
+ Piston::Repository.guess(repository_url)
0
         end
0
- repository
0
       end
0
 
0
       def run(repository_url, target_revision, wcdir)
0
- repository = determine_repository(repository_url)
0
+ repository = select_repository(repository_url)
0
         revision = repository.at(target_revision)
0
 
0
         wcdir = wcdir.nil? ? repository.basename : wcdir
0
@@ -67,7 +66,7 @@
0
       end
0
       
0
       protected
0
- # riped out of activesupport
0
+ # Copied from ActiveSupport
0
       def constantize(camel_cased_word)
0
         unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ camel_cased_word
0
           raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!"
0
@@ -75,7 +74,6 @@
0
       
0
         Object.module_eval("::#{$1}", __FILE__, __LINE__)
0
       end
0
-
0
     end
0
   end
0
 end

Comments

  • DrMark Wed Apr 30 18:12:39 -0700 2008

    Your manifest.txt file on this build is all messed up. If you try to build the gem, it fails with
    rake aborted!
    Don’t know how to build task ‘test/unit/test_git_commit_checkout.rb’
    Thanks and keep up the great work!
    DrMark