public this repo is viewable by everyone
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
Repo Search:
New git_git import sample.
francois (author)
2 months ago
commit  f8b4a270a1300b0e5c7add1c6296936b7e7af041
tree    44a46f99b07beab1e9b7cff4ed030299682fdb6e
parent  d755889565974f8f7ec60463dc26db519549bc89
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
0
@@ -0,0 +1,39 @@
0
+#!/usr/bin/env ruby
0
+#
0
+# Import an SVN repository into an SVN working copy.
0
+require File.dirname(__FILE__) + "/common"
0
+
0
+@root = @root + "tmp/git_git"
0
+@root.rmtree rescue nil
0
+@root.mkpath
0
+
0
+@tmp = @root + "plugin.tmp"
0
+
0
+@plugin = @root + "plugin"
0
+@plugin.mkpath
0
+File.open(@plugin + "README", "wb") {|f| f.puts "Hello World"}
0
+File.open(@plugin + "init.rb", "wb") {|f| f.puts "# Some init code"}
0
+Dir.chdir(@plugin) do
0
+ git :init
0
+ git :add, "."
0
+ git :commit, "-m", "initial commit"
0
+end
0
+
0
+@wc = @root + "wc"
0
+@wc.mkpath
0
+File.open(@wc + "README", "wb") {|f| f.puts "My local project"}
0
+Dir.chdir(@wc) do
0
+ git :init
0
+ git :add, "."
0
+ git :commit, "-m", "initial commit"
0
+end
0
+
0
+repos = Piston::Git::Repository.new("file://" + @plugin.realpath)
0
+commit = repos.at(:head)
0
+commit.checkout_to(@tmp)
0
+
0
+wc = Piston::Git::WorkingCopy.new(@wc + "vendor")
0
+wc.create
0
+wc.copy_from(commit)
0
+wc.remember(commit.remember_values)
0
+wc.finalize

Comments

    No one has commented yet.