rscm-accurev 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +55 -8
- data/TODO +1 -1
- data/bumprelease.sh +3 -0
- data/lib/rscm/accurev.rb +3 -2
- data/lib/rscm/scm/accurev/api.rb +181 -71
- data/lib/rscm/scm/accurev/exception.rb +38 -0
- data/lib/rscm/scm/accurev/xml.rb +42 -0
- data/test/coverage/analyzer.rb +127 -0
- data/test/coverage/c_loader.rb +34 -0
- data/test/coverage/cover.rb +91 -0
- data/test/coverage/coverage_loader.rb +21 -0
- data/test/coverage/coveragetask.rb +38 -0
- data/test/coverage/index_tmpl.html +42 -0
- data/test/coverage/template.html +36 -0
- data/test/eg/ac-files.xml +39 -39
- data/test/eg/ac-pop.txt +195 -0
- data/test/eg/files-various-states.xml +188 -0
- data/test/eg/hist-oneweek-all.xml +1483 -0
- data/test/eg/hist-oneweek-external.xml +246 -0
- data/test/eg/hist-oneweek-promotes.xml +1092 -0
- data/test/eg/info.txt +7 -7
- data/test/eg/stat-a-various.xml +1789 -0
- data/test/eg/stat-m.xml +13 -0
- data/test/eg/stat-overlap.xml +13 -0
- data/test/eg/stat-x.xml +20 -0
- data/test/eg/update-i-mods-and-updates-and-overlap.xml +73 -0
- data/test/eg/update-i-updates.xml +46 -46
- data/test/eg/update-newwksp.xml +88 -88
- data/test/eg/update-updates.xml +46 -46
- data/test/fl +18 -0
- data/test/suite_all.rb +34 -0
- data/test/t_api.rb +47 -5
- data/test/t_command.rb +1 -0
- data/test/t_load.rb +1 -0
- data/test/t_rscm.rb +26 -0
- data/test/t_scrubio.rb +1 -0
- data/test/t_xmlmapper.rb +1 -0
- metadata +25 -3
- data/apitest.rb +0 -21
data/test/eg/update-updates.xml
CHANGED
@@ -7,141 +7,141 @@
|
|
7
7
|
<progress
|
8
8
|
phase="results"
|
9
9
|
number="23"/>
|
10
|
-
<message>Removing "
|
10
|
+
<message>Removing "p1/p2/p3/p4/p5/p6/p7/p8" .
|
11
11
|
</message>
|
12
12
|
<element
|
13
|
-
location="
|
13
|
+
location="p1/p2/p3/p4/p5/p6/p7/p8"/>
|
14
14
|
<checkpoint/>
|
15
|
-
<message>Content (1 K) of "
|
15
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p9/p10" - ok
|
16
16
|
</message>
|
17
17
|
<element
|
18
|
-
location="
|
18
|
+
location="p1/p2/p3/p4/p5/p9/p10"
|
19
19
|
size="1398"/>
|
20
20
|
<checkpoint/>
|
21
|
-
<message>Content (1 K) of "
|
21
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p11" - ok
|
22
22
|
</message>
|
23
23
|
<element
|
24
|
-
location="
|
24
|
+
location="p1/p2/p3/p4/p5/p6/p7/p11"
|
25
25
|
size="793"/>
|
26
26
|
<checkpoint/>
|
27
|
-
<message>Content (1 K) of "
|
27
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p12" - ok
|
28
28
|
</message>
|
29
29
|
<element
|
30
|
-
location="
|
30
|
+
location="p1/p2/p3/p4/p5/p6/p7/p12"
|
31
31
|
size="1712"/>
|
32
32
|
<checkpoint/>
|
33
|
-
<message>Content (3 K) of "
|
33
|
+
<message>Content (3 K) of "p1/p2/p3/p4/p5/p9/p13" - ok
|
34
34
|
</message>
|
35
35
|
<element
|
36
|
-
location="
|
36
|
+
location="p1/p2/p3/p4/p5/p9/p13"
|
37
37
|
size="3846"/>
|
38
38
|
<checkpoint/>
|
39
|
-
<message>Content (1 K) of "
|
39
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p14" - ok
|
40
40
|
</message>
|
41
41
|
<element
|
42
|
-
location="
|
42
|
+
location="p1/p2/p3/p4/p5/p6/p7/p14"
|
43
43
|
size="849"/>
|
44
44
|
<checkpoint/>
|
45
|
-
<message>Content (3 K) of "
|
45
|
+
<message>Content (3 K) of "p1/p2/p3/p4/p5/p6/p7/p15" - ok
|
46
46
|
</message>
|
47
47
|
<element
|
48
|
-
location="
|
48
|
+
location="p1/p2/p3/p4/p5/p6/p7/p15"
|
49
49
|
size="3046"/>
|
50
50
|
<checkpoint/>
|
51
|
-
<message>Content (1 K) of "
|
51
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p16" - ok
|
52
52
|
</message>
|
53
53
|
<element
|
54
|
-
location="
|
54
|
+
location="p1/p2/p3/p4/p5/p6/p7/p16"
|
55
55
|
size="756"/>
|
56
56
|
<checkpoint/>
|
57
|
-
<message>Content (1 K) of "
|
57
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p17" - ok
|
58
58
|
</message>
|
59
59
|
<element
|
60
|
-
location="
|
60
|
+
location="p1/p2/p3/p4/p5/p6/p7/p17"
|
61
61
|
size="849"/>
|
62
62
|
<checkpoint/>
|
63
|
-
<message>Content (1 K) of "
|
63
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p18" - ok
|
64
64
|
</message>
|
65
65
|
<element
|
66
|
-
location="
|
66
|
+
location="p1/p2/p3/p4/p5/p6/p7/p18"
|
67
67
|
size="1806"/>
|
68
68
|
<checkpoint/>
|
69
|
-
<message>Content (3 K) of "
|
69
|
+
<message>Content (3 K) of "p1/p2/p3/p4/p5/p9/p19" - ok
|
70
70
|
</message>
|
71
71
|
<element
|
72
|
-
location="
|
72
|
+
location="p1/p2/p3/p4/p5/p9/p19"
|
73
73
|
size="3495"/>
|
74
74
|
<checkpoint/>
|
75
|
-
<message>Content (2 K) of "
|
75
|
+
<message>Content (2 K) of "p1/p2/p3/p4/p5/p9/p20" - ok
|
76
76
|
</message>
|
77
77
|
<element
|
78
|
-
location="
|
78
|
+
location="p1/p2/p3/p4/p5/p9/p20"
|
79
79
|
size="2523"/>
|
80
80
|
<checkpoint/>
|
81
|
-
<message>Content (2 K) of "
|
81
|
+
<message>Content (2 K) of "p1/p2/p3/p4/p5/p9/p21" - ok
|
82
82
|
</message>
|
83
83
|
<element
|
84
|
-
location="
|
84
|
+
location="p1/p2/p3/p4/p5/p9/p21"
|
85
85
|
size="2513"/>
|
86
86
|
<checkpoint/>
|
87
|
-
<message>Content (2 K) of "
|
87
|
+
<message>Content (2 K) of "p1/p2/p3/p4/p5/p9/p22" - ok
|
88
88
|
</message>
|
89
89
|
<element
|
90
|
-
location="
|
90
|
+
location="p1/p2/p3/p4/p5/p9/p22"
|
91
91
|
size="2537"/>
|
92
92
|
<checkpoint/>
|
93
|
-
<message>Content (1 K) of "
|
93
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p9/p23" - ok
|
94
94
|
</message>
|
95
95
|
<element
|
96
|
-
location="
|
96
|
+
location="p1/p2/p3/p4/p5/p9/p23"
|
97
97
|
size="975"/>
|
98
98
|
<checkpoint/>
|
99
|
-
<message>Content (2 K) of "
|
99
|
+
<message>Content (2 K) of "p1/p2/p3/p4/p5/p9/p8" - ok
|
100
100
|
</message>
|
101
101
|
<element
|
102
|
-
location="
|
102
|
+
location="p1/p2/p3/p4/p5/p9/p8"
|
103
103
|
size="2707"/>
|
104
104
|
<checkpoint/>
|
105
|
-
<message>Content (1 K) of "
|
105
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p24" - ok
|
106
106
|
</message>
|
107
107
|
<element
|
108
|
-
location="
|
108
|
+
location="p1/p2/p3/p4/p5/p6/p7/p24"
|
109
109
|
size="1123"/>
|
110
110
|
<checkpoint/>
|
111
|
-
<message>Content (1 K) of "
|
111
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p25" - ok
|
112
112
|
</message>
|
113
113
|
<element
|
114
|
-
location="
|
114
|
+
location="p1/p2/p3/p4/p5/p6/p7/p25"
|
115
115
|
size="1146"/>
|
116
116
|
<checkpoint/>
|
117
|
-
<message>Content (1 K) of "
|
117
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p26" - ok
|
118
118
|
</message>
|
119
119
|
<element
|
120
|
-
location="
|
120
|
+
location="p1/p2/p3/p4/p5/p6/p7/p26"
|
121
121
|
size="1156"/>
|
122
122
|
<checkpoint/>
|
123
|
-
<message>Content (1 K) of "
|
123
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p27" - ok
|
124
124
|
</message>
|
125
125
|
<element
|
126
|
-
location="
|
126
|
+
location="p1/p2/p3/p4/p5/p6/p7/p27"
|
127
127
|
size="1150"/>
|
128
128
|
<checkpoint/>
|
129
|
-
<message>Content (1 K) of "
|
129
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p28" - ok
|
130
130
|
</message>
|
131
131
|
<element
|
132
|
-
location="
|
132
|
+
location="p1/p2/p3/p4/p5/p6/p7/p28"
|
133
133
|
size="1150"/>
|
134
134
|
<checkpoint/>
|
135
|
-
<message>Content (1 K) of "
|
135
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p29" - ok
|
136
136
|
</message>
|
137
137
|
<element
|
138
|
-
location="
|
138
|
+
location="p1/p2/p3/p4/p5/p6/p7/p29"
|
139
139
|
size="1477"/>
|
140
140
|
<checkpoint/>
|
141
|
-
<message>Content (1 K) of "
|
141
|
+
<message>Content (1 K) of "p1/p2/p3/p4/p5/p6/p7/p30" - ok
|
142
142
|
</message>
|
143
143
|
<element
|
144
|
-
location="
|
144
|
+
location="p1/p2/p3/p4/p5/p6/p7/p30"
|
145
145
|
size="756"/>
|
146
146
|
<checkpoint/>
|
147
147
|
</acResponse>
|
data/test/fl
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
ac-files.xml
|
2
|
+
ac-pop.txt
|
3
|
+
files-various-states.xml
|
4
|
+
hist-oneweek-all.xml
|
5
|
+
hist-oneweek-external.xml
|
6
|
+
hist-oneweek-promotes.xml
|
7
|
+
info.txt
|
8
|
+
stat-a-various.xml
|
9
|
+
stat-m.xml
|
10
|
+
stat-overlap.xml
|
11
|
+
stat-x.xml
|
12
|
+
update-i-mods-and-updates-and-overlap.xml
|
13
|
+
update-i-nochanges.xml
|
14
|
+
update-i-updates.xml
|
15
|
+
update-newwksp.xml
|
16
|
+
update-nochanges.xml
|
17
|
+
update-stale.xml
|
18
|
+
update-updates.xml
|
data/test/suite_all.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test/unit/ui/console/testrunner'
|
5
|
+
require 'rubygems'
|
6
|
+
#require 'coverage'
|
7
|
+
|
8
|
+
class SuiteCrap
|
9
|
+
def self.suite
|
10
|
+
suite = Test::Unit::TestSuite.new
|
11
|
+
Dir.glob( 'test/t_*.rb' ) do |t|
|
12
|
+
require t
|
13
|
+
end
|
14
|
+
ObjectSpace.each_object( Test::Unit::TestCase ) do |k|
|
15
|
+
puts ">Adding #{k}"
|
16
|
+
suite << k.suite
|
17
|
+
end
|
18
|
+
return suite
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
class SuiteAll
|
23
|
+
def self.suite
|
24
|
+
suite = Test::Unit::TestSuite.new
|
25
|
+
require 'test/t_api.rb'
|
26
|
+
suite << AccurevAPITest
|
27
|
+
return suite
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
if $0 == __FILE__
|
32
|
+
Test::Unit::UI::Console::TestRunner.run( SuiteAll )
|
33
|
+
end
|
34
|
+
|
data/test/t_api.rb
CHANGED
@@ -1,10 +1,37 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'test/unit'
|
4
|
+
require 'rubygems'
|
4
5
|
require 'rscm/accurev'
|
6
|
+
require 'fileutils'
|
7
|
+
require 'tmpdir'
|
5
8
|
include RSCM::Accurev
|
6
9
|
|
7
10
|
class AccurevAPITest < Test::Unit::TestCase
|
11
|
+
|
12
|
+
#def test_deduce_backing_workspace_streams()
|
13
|
+
# flunk( "XXX implement me" )
|
14
|
+
#end
|
15
|
+
|
16
|
+
def test_ac_hist()
|
17
|
+
Command.instance do |cmd|
|
18
|
+
cmd.accurev_bin = "./acreplay.rb eg/hist-oneweek-promotes.xml"
|
19
|
+
end
|
20
|
+
api = API.new( "test" )
|
21
|
+
# test array returns
|
22
|
+
txns = api.ac_hist( Time.utc(1980) ) # bound don't matter for this test
|
23
|
+
txns.each do |t|
|
24
|
+
assert_not_nil( t['version'], "Txn #{t} has no versions" )
|
25
|
+
end
|
26
|
+
assert_equal( txns.length, 9 )
|
27
|
+
# block yield
|
28
|
+
txncount = 0
|
29
|
+
api.ac_hist( Time.utc(1974) ) do |txn|
|
30
|
+
txncount+=1
|
31
|
+
assert_not_nil( txn['version'], "Txn #{txn} has no versions" )
|
32
|
+
end
|
33
|
+
assert_equal( txncount, 9 )
|
34
|
+
end
|
8
35
|
|
9
36
|
def test_ac_files()
|
10
37
|
Command.instance do |cmd|
|
@@ -104,18 +131,33 @@ class AccurevAPITest < Test::Unit::TestCase
|
|
104
131
|
info = api.ac_info()
|
105
132
|
assert( info.size == 13 )
|
106
133
|
# some crap
|
107
|
-
assert_equal( "
|
134
|
+
assert_equal( "user", info['Principal'] )
|
108
135
|
assert_equal( "5050", info['port'] )
|
109
136
|
assert_equal( "/usr/local/accurev/bin", info['ACCUREV_BIN'] )
|
110
137
|
# the interesting stuff:
|
111
138
|
# - depot name
|
112
|
-
assert_equal( "
|
139
|
+
assert_equal( "depot-name", info['Depot'] )
|
113
140
|
# - workspace or reference stream name
|
114
|
-
assert_equal( "
|
141
|
+
assert_equal( "streamW", info['ws/ref'] )
|
115
142
|
# - basis stream name
|
116
|
-
assert_equal( "
|
143
|
+
assert_equal( "streamB", info['Basis'] )
|
117
144
|
# - workspace checkout location
|
118
|
-
assert_equal( "/home/
|
145
|
+
assert_equal( "/home/gdf/src/depot-name", info['Top'] )
|
146
|
+
end
|
147
|
+
|
148
|
+
def test_pop()
|
149
|
+
pwd = FileUtils.pwd
|
150
|
+
# want to use a tempdir since checkout_pop does a mkdir
|
151
|
+
tmpdir = "#{Dir.tmpdir}/#{$$}.test"
|
152
|
+
Command.instance do |cmd|
|
153
|
+
cmd.accurev_bin = "#{pwd}/test/acreplay.rb #{pwd}/test/eg/ac-pop.txt"
|
154
|
+
end
|
155
|
+
api = API.new( tmpdir, "depot" )
|
156
|
+
files = api.checkout_pop()
|
157
|
+
assert_equal( 162, files.size() )
|
158
|
+
files.each do |f|
|
159
|
+
assert( !(f =~ /^\//), "Location '#{f}' should not start with '/'" )
|
160
|
+
end
|
119
161
|
end
|
120
162
|
|
121
163
|
end
|
data/test/t_command.rb
CHANGED
data/test/t_load.rb
CHANGED
data/test/t_rscm.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'rscm'
|
6
|
+
require 'rscm/accurev'
|
7
|
+
require 'fileutils'
|
8
|
+
require 'tmpdir'
|
9
|
+
include RSCM::Accurev
|
10
|
+
|
11
|
+
#
|
12
|
+
# Tests for RSCM functionality
|
13
|
+
#
|
14
|
+
class RSCMAPITest < Test::Unit::TestCase
|
15
|
+
|
16
|
+
def test_revisions()
|
17
|
+
Command.instance do |cmd|
|
18
|
+
cmd.accurev_bin = "./acreplay.rb eg/hist-oneweek-promotes.xml"
|
19
|
+
end
|
20
|
+
api = API.new( "test" )
|
21
|
+
revisions = api.revisions( Time.utc( 1979 ) )
|
22
|
+
assert_not_nil( revisions )
|
23
|
+
assert( revisions.kind_of?( RSCM::Revisions ) )
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/test/t_scrubio.rb
CHANGED
data/test/t_xmlmapper.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rscm-accurev
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.0.6
|
7
|
+
date: 2005-09-02 00:00:00 -05:00
|
8
8
|
summary: "RSCM::Accurev - RSCM API for Accurev"
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,9 +29,9 @@ cert_chain:
|
|
29
29
|
authors:
|
30
30
|
- Greg Fast
|
31
31
|
files:
|
32
|
-
- apitest.rb
|
33
32
|
- bumprelease.sh
|
34
33
|
- doc
|
34
|
+
- eg
|
35
35
|
- lib
|
36
36
|
- LICENSE
|
37
37
|
- Rakefile
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- lib/rscm/scm/accurev
|
48
48
|
- lib/rscm/scm/accurev/api.rb
|
49
49
|
- lib/rscm/scm/accurev/command.rb
|
50
|
+
- lib/rscm/scm/accurev/exception.rb
|
50
51
|
- lib/rscm/scm/accurev/filterio.rb
|
51
52
|
- lib/rscm/scm/accurev/xml.rb
|
52
53
|
- lib/test/unit
|
@@ -55,15 +56,36 @@ files:
|
|
55
56
|
- lib/test/unit/ui/xml/testrunner.rb
|
56
57
|
- lib/test/unit/ui/xml/xmltestrunner.xslt
|
57
58
|
- test/acreplay.rb
|
59
|
+
- test/coverage
|
58
60
|
- test/eg
|
61
|
+
- test/fl
|
62
|
+
- test/suite_all.rb
|
59
63
|
- test/t_api.rb
|
60
64
|
- test/t_command.rb
|
61
65
|
- test/t_filterio.rb
|
62
66
|
- test/t_load.rb
|
67
|
+
- test/t_rscm.rb
|
63
68
|
- test/t_scrubio.rb
|
64
69
|
- test/t_xmlmapper.rb
|
70
|
+
- test/coverage/analyzer.rb
|
71
|
+
- test/coverage/c_loader.rb
|
72
|
+
- test/coverage/cover.rb
|
73
|
+
- test/coverage/coverage_loader.rb
|
74
|
+
- test/coverage/coveragetask.rb
|
75
|
+
- test/coverage/index_tmpl.html
|
76
|
+
- test/coverage/template.html
|
65
77
|
- test/eg/ac-files.xml
|
78
|
+
- test/eg/ac-pop.txt
|
79
|
+
- test/eg/files-various-states.xml
|
80
|
+
- test/eg/hist-oneweek-all.xml
|
81
|
+
- test/eg/hist-oneweek-external.xml
|
82
|
+
- test/eg/hist-oneweek-promotes.xml
|
66
83
|
- test/eg/info.txt
|
84
|
+
- test/eg/stat-a-various.xml
|
85
|
+
- test/eg/stat-m.xml
|
86
|
+
- test/eg/stat-overlap.xml
|
87
|
+
- test/eg/stat-x.xml
|
88
|
+
- test/eg/update-i-mods-and-updates-and-overlap.xml
|
67
89
|
- test/eg/update-i-nochanges.xml
|
68
90
|
- test/eg/update-i-updates.xml
|
69
91
|
- test/eg/update-newwksp.xml
|
data/apitest.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/opt/ruby/bin/ruby
|
2
|
-
require 'rubygems'
|
3
|
-
|
4
|
-
$:<<"lib"
|
5
|
-
require 'rscm/scm/accurev'
|
6
|
-
|
7
|
-
#files; ac = RSCM::Accurev.new( '/home/gfast/dev/orbitz-host-gt3-0-impl' )
|
8
|
-
#files; ac.ac_files(".").each do |f|
|
9
|
-
#files; puts "#{f.location}\t\t#{f.status}"
|
10
|
-
#files; end
|
11
|
-
|
12
|
-
# yes, i cannot spell, the dir is "hirdcar":
|
13
|
-
ac = RSCM::Accurev.new( '/home/gfast/dev/orbitz-api-hirdcar-0-rc' )
|
14
|
-
ac.backing_stream = "orbitz-api-hiredcar-0-rc"
|
15
|
-
ac.workspace_stream = "orbitz-api-hiredcar-0-rc-testing_gfast"
|
16
|
-
ac.checkout() do |l|
|
17
|
-
puts l
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
|