public
Fork of francois/piston
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/tapajos/piston.git
Fixed piston update to a relative path.
Jan Nelson & Brian Takita (author)
Tue Aug 26 12:29:39 -0700 2008
commit  cedbe5eda3c0e03266f4558eb86365d059a096aa
tree    b35c64621eb1c9dcaa9e5e61d24cf04f2be6fc88
parent  85eaaa3eb413f9dcd64ac4a47e27db6e276ea0b8
...
91
92
93
94
 
95
96
97
...
239
240
241
242
 
243
244
245
...
91
92
93
 
94
95
96
97
...
239
240
241
 
242
243
244
245
0
@@ -91,7 +91,7 @@ Main {
0
                                          :repository_type => params["repository-type"].value)
0
 
0
       begin
0
- cmd.run(params[:repository].value, self.target_revision, params[:directory].value)
0
+ cmd.run(params[:repository].value, self.target_revision, File.expand_path(params[:directory].value))
0
       rescue Piston::Repository::UnhandledUrl => e
0
         supported_types = Piston::Repository.handlers.collect do |handler|
0
           handler.repository_type
0
@@ -239,7 +239,7 @@ Main {
0
                                          :dry_run => params["dry-run"].value)
0
 
0
       begin
0
- cmd.run(params["directory"].value, target_revision)
0
+ cmd.run(File.expand_path(params["directory"].value), target_revision)
0
       rescue
0
         $stderr.puts $!.message
0
         $stderr.puts $!.backtrace.join("\n")
...
40
41
42
43
 
44
45
46
...
40
41
42
 
43
44
45
46
0
@@ -40,7 +40,7 @@ module Piston
0
       else
0
         @path = Pathname.new(File.expand_path(path))
0
       end
0
- logger.debug {"In)itialized on #{@path}"}
0
+ logger.debug {"Initialized on #{@path}"}
0
     end
0
 
0
     def logger
...
1
2
3
4
 
5
6
7
...
32
33
34
35
 
 
 
36
37
38
...
59
60
61
62
 
 
 
63
64
65
...
74
75
76
77
 
 
 
78
79
80
...
1
2
3
 
4
5
6
7
...
32
33
34
 
35
36
37
38
39
40
...
61
62
63
 
64
65
66
67
68
69
...
78
79
80
 
81
82
83
84
85
86
0
@@ -1,7 +1,7 @@
0
 require File.expand_path("#{File.dirname(__FILE__)}/../test_helper")
0
 
0
 class TestGitGit < Piston::TestCase
0
- attr_reader :root_path, :repos_path, :parent_path, :wc_path
0
+ attr_reader :root_path, :parent_path, :wc_path
0
 
0
   def setup
0
     super
0
@@ -32,7 +32,9 @@ class TestGitGit < Piston::TestCase
0
   end
0
 
0
   def test_import
0
- piston(:import, parent_path, wc_path + "vendor/parent")
0
+ Dir.chdir(wc_path) do
0
+ piston(:import, parent_path, "vendor/parent")
0
+ end
0
 
0
     Dir.chdir(wc_path) do
0
       assert_equal IMPORT_STATUS.split("\n").sort, git(:status).split("\n").sort
0
@@ -59,7 +61,9 @@ class TestGitGit < Piston::TestCase
0
 )
0
 
0
   def test_update
0
- piston(:import, parent_path, wc_path + "vendor/parent")
0
+ Dir.chdir(wc_path) do
0
+ piston(:import, parent_path, "vendor/parent")
0
+ end
0
 
0
     Dir.chdir(wc_path) do
0
       git(:add, ".")
0
@@ -74,7 +78,9 @@ class TestGitGit < Piston::TestCase
0
       git(:commit, "-m", "'second commit'")
0
     end
0
 
0
- piston(:update, wc_path + "vendor/parent")
0
+ Dir.chdir(wc_path) do
0
+ piston(:update, "vendor/parent")
0
+ end
0
 
0
     Dir.chdir(wc_path) do
0
       assert_equal CHANGE_STATUS.split("\n"), git(:status).split("\n")
...
21
22
23
24
 
 
 
25
26
27
...
21
22
23
 
24
25
26
27
28
29
0
@@ -21,7 +21,9 @@ class TestImportSvnGit < Piston::TestCase
0
   end
0
 
0
   def test_import
0
- piston :import, "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement/", wc_path + "vendor/ssl_requirement"
0
+ Dir.chdir(wc_path) do
0
+ piston :import, "http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement/", "vendor/ssl_requirement"
0
+ end
0
 
0
     Dir.chdir(wc_path) do
0
       assert_equal %Q(# On branch master

Comments

    No one has commented yet.