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::Repository#at with recalled values passes the recalled values 
to Piston::Svn::Revision#new.

Piston::Revision stores the recalled values locally.
francois (author)
Tue May 13 16:23:25 -0700 2008
commit  8daefdb007d2cd6b2a300ea0752a2353d046e525
tree    3382375be3d95e3781eb9146e0086f3d9023389e
parent  4c53f702589f0a701883e779b4bddcd55a2fc283
...
8
9
10
11
 
12
13
14
 
 
15
16
17
...
8
9
10
 
11
12
 
 
13
14
15
16
17
0
@@ -8,10 +8,10 @@
0
       end
0
     end
0
 
0
- attr_reader :repository, :revision
0
+ attr_reader :repository, :revision, :recalled_values
0
 
0
- def initialize(repository, revision)
0
- @repository, @revision = repository, revision
0
+ def initialize(repository, revision, recalled_values = nil)
0
+ @repository, @revision, @recalled_values = repository, revision, recalled_values
0
     end
0
     
0
     def name
...
42
43
44
 
45
46
47
48
49
50
51
52
53
 
 
 
 
 
 
 
 
54
55
56
57
58
59
...
42
43
44
45
46
 
 
 
 
 
 
 
 
47
48
49
50
51
52
53
54
55
 
 
56
57
58
0
@@ -42,18 +42,17 @@
0
       def at(revision)
0
         if revision.respond_to?(:keys) then
0
           rev = revision[Piston::Svn::REMOTE_REV]
0
+ Piston::Svn::Revision.new(self, rev, revision)
0
         else
0
- rev = case
0
- when revision == :head
0
- "HEAD"
0
- when revision.to_i != 0
0
- revision.to_i
0
- else
0
- raise ArgumentError, "Invalid revision argument: #{revision.inspect}"
0
- end
0
+ case
0
+ when revision == :head
0
+ Piston::Svn::Revision.new(self, "HEAD")
0
+ when revision.to_i != 0
0
+ Piston::Svn::Revision.new(self, revision.to_i)
0
+ else
0
+ raise ArgumentError, "Invalid revision argument: #{revision.inspect}"
0
+ end
0
         end
0
-
0
- Piston::Svn::Revision.new(self, rev)
0
       end
0
 
0
       def basename
...
11
12
13
14
15
16
 
 
 
17
18
...
11
12
13
 
 
 
14
15
16
17
18
0
@@ -11,9 +11,9 @@
0
   end
0
 
0
   def test_instantiate_revision_using_recalled_values
0
- Piston::Svn::Revision.expects(:new).with(@repos, 9123).returns(:newrev)
0
- assert_equal :newrev, @repos.at(Piston::Svn::REMOTE_REV => 9123,
0
- Piston::Svn::UUID => "5ecf4fe2-1ee6-0310-87b1-e25e094e27de")
0
+ recalled_values = {Piston::Svn::REMOTE_REV => 9123, Piston::Svn::UUID => "5ecf4fe2-1ee6-0310-87b1-e25e094e27de"}
0
+ Piston::Svn::Revision.expects(:new).with(@repos, 9123, recalled_values).returns(:newrev)
0
+ assert_equal :newrev, @repos.at(recalled_values)
0
   end
0
 end

Comments

    No one has commented yet.