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:
Refactored Piston::Commands::Base to automatically call #validate! on the 
returned working copy.

No need to call #validate! in each subcommand anymore.
francois (author)
Tue May 13 15:53:10 -0700 2008
commit  e3ecdb9457fe4604d79a9b159bf88140041150a0
tree    5de02efd60b52ae51113dac9d92df7a92fef0b3f
parent  f22e7087d60160c403ef851b4e2cad6c16b98ba1
...
31
32
33
34
 
 
 
 
 
 
 
35
36
37
...
31
32
33
 
34
35
36
37
38
39
40
41
42
43
0
@@ -31,7 +31,13 @@
0
       end
0
       
0
       def guess_wc(wcdir)
0
- working_copy = Piston::WorkingCopy.guess(wcdir)
0
+ Piston::WorkingCopy.guess(wcdir)
0
+ end
0
+
0
+ def working_copy!(wcdir)
0
+ wc = guess_wc(wcdir)
0
+ wc.validate!
0
+ wc
0
       end
0
     end
0
   end
...
6
7
8
9
10
 
11
12
13
...
6
7
8
 
 
9
10
11
12
0
@@ -6,8 +6,7 @@
0
       attr_reader :options
0
 
0
       def run(wcdir)
0
- working_copy = guess_wc(wcdir)
0
- working_copy.validate!
0
+ working_copy = working_copy!(wcdir)
0
         working_copy.info.to_yaml
0
       end
0
     end
...
6
7
8
9
10
 
11
12
13
...
6
7
8
 
 
9
10
11
12
0
@@ -6,8 +6,7 @@
0
       attr_reader :options
0
 
0
       def run(wcdir, lock)
0
- working_copy = guess_wc(wcdir)
0
- working_copy.validate!
0
+ working_copy = working_copy!(wcdir)
0
 
0
         values = working_copy.recall
0
         values["lock"] = lock
...
6
7
8
9
10
 
11
12
13
...
6
7
8
 
 
9
10
11
12
0
@@ -6,8 +6,7 @@
0
       # +wcdir+ is the working copy we're going to change.
0
       # +to+ is the new target revision we want to be at after update returns.
0
       def run(wcdir, to)
0
- working_copy = guess_wc(wcdir)
0
- working_copy.validate!
0
+ working_copy = working_copy!(wcdir)
0
 
0
         logger.debug {"Recalling previously saved values"}
0
         values = working_copy.recall

Comments

    No one has commented yet.