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
francois (author)
Tue May 13 17:17:53 -0700 2008
commit  1d52246f7acabb0fdec2f555430702840146d418
tree    744b3fa8d01e231c8493bedd58a04a48fccff70c
parent  0d066f30f00db013c1dd0ac62b464156dc061b92
piston / test / integration / test_import_git_svn.rb
100644 103 lines (92 sloc) 5.075 kb
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
require File.dirname(__FILE__) + "/../test_helper"
require File.dirname(__FILE__) + "/../integration_helpers"
 
class TestImportGitSvn < Test::Unit::TestCase
  attr_reader :root_path, :repos_path, :wc_path
 
  def setup
    @root_path = Pathname.new("/tmp/import_git_svn")
    @repos_path = @root_path + "repos"
    @wc_path = @root_path + "wc"
 
    root_path.rmtree rescue nil
    root_path.mkpath
 
    svnadmin :create, repos_path
    svn :checkout, "file://#{repos_path}", wc_path
    svn :mkdir, wc_path + "trunk", wc_path + "tags", wc_path + "branches", wc_path + "trunk/vendor"
    svn :commit, wc_path, "--message", "'first commit'"
  end
 
  def teardown
    root_path.rmtree rescue nil
  end
 
  def test_import
    piston(:import, "git://github.com/technoweenie/attachment_fu.git", wc_path + "trunk/vendor/attachment_fu")
 
    assert_equal ADD_STATUS.split("\n").sort, svn(:status, wc_path + "trunk/vendor").gsub((wc_path + "trunk/").to_s, "").split("\n").sort
 
    info = YAML.load(File.read(wc_path + "trunk/vendor/attachment_fu/.piston.yml"))
    assert_equal 1, info["format"]
    assert_equal "git://github.com/technoweenie/attachment_fu.git", info["repository_url"]
    assert_equal "Piston::Git::Repository", info["repository_class"]
 
    response = `git-ls-remote git://github.com/technoweenie/attachment_fu.git`
    head_commit = response.grep(/HEAD/).first.chomp.split(/\s+/).first
    assert_equal head_commit, info["handler"][Piston::Git::COMMIT]
  end
 
  ADD_STATUS = %Q(A vendor/attachment_fu
A vendor/attachment_fu/test
A vendor/attachment_fu/test/test_helper.rb
A vendor/attachment_fu/test/processors
A vendor/attachment_fu/test/processors/mini_magick_test.rb
A vendor/attachment_fu/test/processors/core_image_test.rb
A vendor/attachment_fu/test/processors/image_science_test.rb
A vendor/attachment_fu/test/processors/gd2_test.rb
A vendor/attachment_fu/test/processors/rmagick_test.rb
A vendor/attachment_fu/test/basic_test.rb
A vendor/attachment_fu/test/schema.rb
A vendor/attachment_fu/test/database.yml
A vendor/attachment_fu/test/base_attachment_tests.rb
A vendor/attachment_fu/test/fixtures
A vendor/attachment_fu/test/fixtures/files
A vendor/attachment_fu/test/fixtures/files/foo.txt
A vendor/attachment_fu/test/fixtures/files/fake
A vendor/attachment_fu/test/fixtures/files/fake/rails.png
A vendor/attachment_fu/test/fixtures/files/rails.png
A vendor/attachment_fu/test/fixtures/attachment.rb
A vendor/attachment_fu/test/backends
A vendor/attachment_fu/test/backends/file_system_test.rb
A vendor/attachment_fu/test/backends/db_file_test.rb
A vendor/attachment_fu/test/backends/remote
A vendor/attachment_fu/test/backends/remote/s3_test.rb
A vendor/attachment_fu/test/validation_test.rb
A vendor/attachment_fu/test/extra_attachment_test.rb
A vendor/attachment_fu/test/geometry_test.rb
A vendor/attachment_fu/Rakefile
A vendor/attachment_fu/init.rb
A vendor/attachment_fu/lib
A vendor/attachment_fu/lib/technoweenie
A vendor/attachment_fu/lib/technoweenie/attachment_fu
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors/core_image_processor.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors/gd2_processor.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/backends
A vendor/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/backends/db_file_backend.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb
A vendor/attachment_fu/lib/technoweenie/attachment_fu.rb
A vendor/attachment_fu/lib/geometry.rb
A vendor/attachment_fu/CHANGELOG
A vendor/attachment_fu/amazon_s3.yml.tpl
A vendor/attachment_fu/install.rb
A vendor/attachment_fu/.piston.yml
A vendor/attachment_fu/vendor
A vendor/attachment_fu/vendor/red_artisan
A vendor/attachment_fu/vendor/red_artisan/core_image
A vendor/attachment_fu/vendor/red_artisan/core_image/processor.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/watermark.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/color.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/scale.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/quality.rb
A vendor/attachment_fu/vendor/red_artisan/core_image/filters/perspective.rb
A vendor/attachment_fu/README
)
end