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:
Updated samples to test svn/svn and svn/git.
francois (author)
Sat Mar 15 11:34:40 -0700 2008
commit  8324aa04d5d3c9b95c13fd7a2bf2f5d0567d04b7
tree    47b0b2d34f2f031ae5a0ebcb6a717dee4bcb7326
parent  6c97164854aec273c2cb5fdf812ddc96f6ef8770
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1 +1,19 @@
0
+# Common code between all sample files.
0
+# Setup the environment.
0
+require "pathname"
0
+require "logger"
0
+
0
+@root = Pathname.new(File.dirname(__FILE__)).parent
0
+$:.unshift @root + "lib"
0
+
0
+require "piston"
0
+require "piston/svn"
0
+require "piston/git"
0
+
0
+PISTON_DEFAULT_LOGGER = Logger.new(STDOUT)
0
+Piston::Repository.logger = Piston::WorkingCopy.logger = PISTON_DEFAULT_LOGGER
0
+def logger; PISTON_DEFAULT_LOGGER; end
0
+
0
+include Piston::Svn::Client
0
+include Piston::Git::Client
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
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
0
@@ -1 +1,26 @@
0
+#!/usr/bin/env ruby
0
+#
0
+# Import an SVN repository into a Git working copy.
0
+require File.dirname(__FILE__) + "/common"
0
+
0
+(@root + "tmp/repos").rmtree rescue nil
0
+(@root + "tmp/wc").rmtree rescue nil
0
+(@root + "tmp/.xlsuite.tmp").rmtree rescue nil
0
+
0
+(@root + "tmp/wc").mkpath
0
+File.open(@root + "tmp/wc/README", "wb") {|f| f.write "Hello World"}
0
+Dir.chdir(@root + "tmp/wc") do
0
+ git :init
0
+ git :add, "."
0
+ git :commit, "-m", "initial"
0
+end
0
+
0
+repos = Piston::Svn::Repository.new("http://svn.xlsuite.org/trunk/lib")
0
+rev = repos.at(:head)
0
+rev.checkout_to(@root + "tmp/.xlsuite.tmp")
0
+wc = Piston::Git::WorkingCopy.new(@root + "tmp/wc/vendor")
0
+wc.create
0
+wc.copy_from(rev)
0
+wc.remember(rev.remember_values)
0
+wc.finalize
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
 
 
 
16
17
18
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
0
@@ -1,18 +1,7 @@
0
-require "pathname"
0
-require "logger"
0
-
0
-@root = Pathname.new(File.dirname(__FILE__)).parent
0
-
0
-$:.unshift @root + "lib"
0
-$:.unshift @root + "../piston-core/lib"
0
-
0
-require "piston"
0
-require "piston/svn"
0
-
0
-PISTON_DEFAULT_LOGGER = Logger.new(STDOUT)
0
-Piston::Repository.logger = Piston::WorkingCopy.logger = PISTON_DEFAULT_LOGGER
0
-def logger; PISTON_DEFAULT_LOGGER; end
0
-include Piston::Svn::Client
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 + "tmp/repos").rmtree rescue nil
0
 (@root + "tmp/wc").rmtree rescue nil

Comments

    No one has commented yet.