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:
Piston::Svn::WorkingCopy#after_remember adds the .piston.yml file to the 
working copy.
francois (author)
Sat Mar 22 18:49:56 -0700 2008
commit  b6511e48f77789ea3718cd82492c1a09de7dccff
tree    7515064682eed188cfb43f20340ae5005ee6e410
parent  c9907db998f58f0efcfc6e7df52c1e3eff9ebe41
...
35
36
37
 
 
 
 
 
 
38
39
40
...
35
36
37
38
39
40
41
42
43
44
45
46
0
@@ -35,6 +35,12 @@
0
         svn(:mkdir, path)
0
       end
0
 
0
+ def after_remember(path)
0
+ info = svn(:info, path)
0
+ return unless info =~ /\(not a versioned resource\)/i
0
+ svn(:add, path)
0
+ end
0
+
0
       def recall(keys)
0
         hash = Hash.new
0
         keys.each do |k|
...
13
14
15
 
 
 
 
 
 
 
 
 
 
16
...
13
14
15
16
17
18
19
20
21
22
23
24
25
26
0
@@ -13,5 +13,15 @@
0
     @wcdir.rmtree rescue nil
0
   end
0
 
0
+ def test_after_remember_adds_path_using_svn
0
+ @wc.expects(:svn).with(:info, :the_path).returns("a: (Not a versioned resource)\n")
0
+ @wc.expects(:svn).with(:add, :the_path)
0
+ @wc.after_remember(:the_path)
0
+ end
0
+
0
+ def test_after_remember_does_not_add_if_file_already_under_version_control
0
+ @wc.expects(:svn).with(:info, :the_path).returns("a: b\n")
0
+ @wc.after_remember(:the_path)
0
+ end
0
 end

Comments

    No one has commented yet.