rscm 0.2.1.1404 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/README +34 -23
  2. data/Rakefile +24 -29
  3. data/bin/touch.exe +0 -0
  4. data/lib/rscm.rb +6 -3
  5. data/lib/rscm/annotations.rb +26 -7
  6. data/lib/rscm/{abstract_scm.rb → base.rb} +109 -71
  7. data/lib/rscm/better.rb +16 -0
  8. data/lib/rscm/logging.rb +11 -5
  9. data/lib/rscm/path_converter.rb +9 -16
  10. data/lib/rscm/revision.rb +201 -0
  11. data/lib/rscm/revision_file.rb +71 -0
  12. data/lib/rscm/scm/clearcase.rb +7 -7
  13. data/lib/rscm/scm/cvs.rb +69 -70
  14. data/lib/rscm/scm/cvs_log_parser.rb +29 -29
  15. data/lib/rscm/scm/darcs.rb +82 -34
  16. data/lib/rscm/scm/darcs_log_parser.rb +65 -0
  17. data/lib/rscm/scm/monotone.rb +249 -77
  18. data/lib/rscm/scm/monotone_log_parser.rb +57 -43
  19. data/lib/rscm/scm/mooky.rb +3 -3
  20. data/lib/rscm/scm/perforce.rb +196 -134
  21. data/lib/rscm/scm/star_team.rb +10 -10
  22. data/lib/rscm/scm/subversion.rb +106 -77
  23. data/lib/rscm/scm/subversion_log_parser.rb +76 -47
  24. data/lib/rscm/time_ext.rb +2 -116
  25. data/test/rscm/annotations_test.rb +15 -2
  26. data/test/rscm/{abstract_scm_test.rb → base_test.rb} +3 -3
  27. data/test/rscm/difftool_test.rb +9 -3
  28. data/test/rscm/generic_scm_tests.rb +195 -124
  29. data/test/rscm/revision_fixture.rb +20 -0
  30. data/test/rscm/revision_test.rb +129 -0
  31. data/test/rscm/{changesets.yaml → revisions.yaml} +10 -10
  32. data/test/rscm/scm/clearcase.log +608 -0
  33. data/test/rscm/scm/clearcase_test.rb +39 -0
  34. data/test/rscm/scm/cvs_log_parser_test.rb +73 -73
  35. data/test/rscm/scm/cvs_test.rb +1 -1
  36. data/test/rscm/scm/darcs_log_parser_test.rb +171 -0
  37. data/test/rscm/scm/monotone_log_parser_test.rb +49 -31
  38. data/test/rscm/scm/monotone_test.rb +3 -2
  39. data/test/rscm/scm/p4client_test.rb +33 -0
  40. data/test/rscm/scm/perforce_test.rb +25 -3
  41. data/test/rscm/scm/star_team.rb +9 -9
  42. data/test/rscm/scm/subversion_log_parser_test.rb +107 -47
  43. metadata +17 -13
  44. data/lib/multipart.rb +0 -95
  45. data/lib/rscm/RSS.txt +0 -41
  46. data/lib/rscm/changes.rb +0 -268
  47. data/lib/rscm/example.yaml +0 -21
  48. data/lib/rubyforge_file_publisher.rb +0 -176
  49. data/test/rscm/changes_fixture.rb +0 -20
  50. data/test/rscm/changes_test.rb +0 -129
@@ -22,29 +22,29 @@ imported
22
22
  sources
23
23
  EOF
24
24
 
25
- def test_should_parse_CHANGESET_to_changeset
25
+ def test_should_parse_CHANGESET_to_revision
26
26
  parser = MonotoneLogParser.new
27
- changeset = parser.parse_changeset(StringIO.new(CHANGESET), {})
27
+ revision = parser.parse_revision(StringIO.new(CHANGESET), {})
28
28
 
29
- assert_equal("a2c58e276439de7d9da549870e245776c592c7e8", changeset.revision)
30
- assert_equal("tester@test.net", changeset.developer)
31
- assert_equal(Time.utc(2005,3,2,6,32,43), changeset.time)
29
+ assert_equal("a2c58e276439de7d9da549870e245776c592c7e8", revision.identifier)
30
+ assert_equal("tester@test.net", revision.developer)
31
+ assert_equal(Time.utc(2005,3,2,6,32,43), revision.time)
32
32
 
33
- assert_equal(4, changeset.length)
33
+ assert_equal(4, revision.length)
34
34
 
35
- assert_equal("build.xml", changeset[0].path)
36
- assert_equal(Change::ADDED, changeset[0].status)
35
+ assert_equal("build.xml", revision[0].path)
36
+ assert_equal(RevisionFile::ADDED, revision[0].status)
37
37
 
38
- assert_equal("project.xml", changeset[1].path)
39
- assert_equal(Change::ADDED, changeset[1].status)
38
+ assert_equal("project.xml", revision[1].path)
39
+ assert_equal(RevisionFile::ADDED, revision[1].status)
40
40
 
41
- assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", changeset[2].path)
42
- assert_equal(Change::ADDED, changeset[2].status)
41
+ assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", revision[2].path)
42
+ assert_equal(RevisionFile::ADDED, revision[2].status)
43
43
 
44
- assert_equal("src/test/com/thoughtworks/damagecontrolled/ThingyTestCase.java", changeset[3].path)
45
- assert_equal(Change::ADDED, changeset[3].status)
44
+ assert_equal("src/test/com/thoughtworks/damagecontrolled/ThingyTestCase.java", revision[3].path)
45
+ assert_equal(RevisionFile::ADDED, revision[3].status)
46
46
 
47
- assert_equal("imported\nsources", changeset.message)
47
+ assert_equal("imported\nsources", revision.message)
48
48
  end
49
49
 
50
50
  CHANGESETS = <<EOF
@@ -77,32 +77,50 @@ imported
77
77
  sources
78
78
  EOF
79
79
 
80
- def test_should_parse_CHANGESETS_to_changesets
80
+ def test_should_parse_CHANGESETS_to_revisions
81
81
  parser = MonotoneLogParser.new
82
- changesets = parser.parse_changesets(StringIO.new(CHANGESETS))
83
- assert_equal(2, changesets.length)
84
- changeset = changesets[0]
82
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS))
83
+ assert_equal(2, revisions.length)
84
+ revision = revisions[0]
85
85
 
86
- assert_equal("build.xml", changeset[0].path)
87
- assert_equal(Change::MODIFIED, changeset[0].status)
86
+ assert_equal("build.xml", revision[0].path)
87
+ assert_equal(RevisionFile::MODIFIED, revision[0].status)
88
88
 
89
- assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", changeset[1].path)
90
- assert_equal(Change::MODIFIED, changeset[1].status)
89
+ assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", revision[1].path)
90
+ assert_equal(RevisionFile::MODIFIED, revision[1].status)
91
91
  end
92
92
 
93
- def test_should_parse_CHANGESETS_to_changesets_before
93
+ def test_should_parse_CHANGESETS_to_revisions_before
94
94
  parser = MonotoneLogParser.new
95
- changesets = parser.parse_changesets(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,32,43))
96
- assert_equal(2, changesets.length)
95
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,32,42))
96
+ assert_equal(2, revisions.length)
97
+
98
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,32,43))
99
+ assert_equal(1, revisions.length)
100
+
101
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,33,00))
102
+ assert_equal(1, revisions.length)
103
+
104
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,33,01))
105
+ assert_equal(0, revisions.length)
106
+ end
107
+
108
+ def test_should_parse_CHANGESETS_to_revisions_before_with_ids
109
+ parser = MonotoneLogParser.new
110
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), "a2c58e276439de7d9da549870e245776c592c7e8")
111
+ assert_equal(1, revisions.length)
112
+ assert_equal("a2c58e276439de7d9da549870e245776c592c7e8", revisions[0][0].previous_native_revision_identifier)
113
+ assert_equal("abbe1eb8f75bdf9b27d440340ec329816c13985c", revisions[0][0].native_revision_identifier)
114
+
97
115
 
98
- changesets = parser.parse_changesets(StringIO.new(CHANGESETS), Time.utc(2005,03,02,06,32,44))
99
- assert_equal(1, changesets.length)
116
+ revisions = parser.parse_revisions(StringIO.new(CHANGESETS), "abbe1eb8f75bdf9b27d440340ec329816c13985c")
117
+ assert_equal(0, revisions.length)
100
118
  end
101
119
 
102
- def test_should_parse_CHANGESET_to_changesets
120
+ def test_should_parse_CHANGESET_to_revisions
103
121
  parser = MonotoneLogParser.new
104
- changesets = parser.parse_changesets(StringIO.new(CHANGESET))
105
- assert_equal(1, changesets.length)
122
+ revisions = parser.parse_revisions(StringIO.new(CHANGESET))
123
+ assert_equal(1, revisions.length)
106
124
  end
107
125
 
108
126
  end
@@ -8,11 +8,12 @@ module RSCM
8
8
 
9
9
  def create_scm(repository_root_dir, path)
10
10
  mt = Monotone.new(
11
- "#{repository_root_dir}/MT.db",
12
11
  "com.example.testproject",
13
12
  "tester@test.net",
14
13
  "tester@test.net",
15
- File.dirname(__FILE__) + "/keys"
14
+ File.dirname(__FILE__) + "/keys",
15
+ "localhost",
16
+ "#{repository_root_dir}/central_repo"
16
17
  )
17
18
  end
18
19
  end
@@ -0,0 +1,33 @@
1
+ require 'test/unit'
2
+ require 'rscm'
3
+ require 'rscm/generic_scm_tests'
4
+
5
+ module RSCM
6
+ class P4Client
7
+
8
+ include Test::Unit::Assertions
9
+
10
+ def p4(cmd)
11
+ assert_equal @expected, cmd
12
+ @returnValue
13
+ end
14
+
15
+ def expect cmd, returnValue
16
+ @expected = cmd
17
+ @returnValue = returnValue
18
+ end
19
+ end
20
+
21
+ class P4ClientTests < Test::Unit::TestCase
22
+ def test_correctly_decodes_changes_specifiers
23
+ client = P4Client.new "foo"
24
+ client.expect "changes //...@1200,2036/01/01:00:00:00", ""
25
+ client.revisions("1200", Time.infinity)
26
+ end
27
+ def test_should_accept_changespecs_for_from_and_to
28
+ client = P4Client.new "foo"
29
+ client.expect "changes //...@1200,@1300", ""
30
+ client.revisions("1200", "1300")
31
+ end
32
+ end
33
+ end
@@ -4,11 +4,33 @@ require 'rscm/generic_scm_tests'
4
4
 
5
5
  module RSCM
6
6
  class PerforceTest < Test::Unit::TestCase
7
-
8
7
  include GenericSCMTests
9
8
 
10
- def create_scm(repository_root_dir, path)
11
- Perforce.new(repository_root_dir)
9
+ def create_scm(repository_root_dir, path = nil)
10
+ p4 = Perforce.new
11
+ p4.repository_root_dir = repository_root_dir
12
+ p4
13
+ end
14
+
15
+ def test_shuld_create_new_client_only_if_it_does_not_already_exist
16
+ work_dir = RSCM.new_temp_dir("use_existing_client")
17
+ checkout_dir = "#{work_dir}/WorkingCopy"
18
+ repository_dir = "#{work_dir}/repository"
19
+ name = "client-one"
20
+
21
+ scm = create_scm(repository_dir)
22
+ scm.client_name = name
23
+ scm.checkout_dir = checkout_dir
24
+
25
+ scm.create_central
26
+ @scm = scm
27
+ import_damagecontrolled(scm, "#{work_dir}/damagecontrolled")
28
+ assert(!scm.uptodate?(nil))
29
+
30
+ other = create_scm(repository_dir)
31
+ other.client_name = name
32
+ other.checkout_dir = checkout_dir
33
+ assert(!other.uptodate?(nil))
12
34
  end
13
35
  end
14
36
  end
@@ -11,18 +11,18 @@ module RSCM
11
11
  StarTeam.new(ENV["STARTEAM_USER"], ENV["STARTEAM_PASS"], "192.168.254.21", 49201, "NGST Application", "NGST Application", "java")
12
12
  end
13
13
 
14
- def test_changesets
14
+ def test_revisions
15
15
  from = Time.new - 2 * 3600 * 24
16
16
  to = Time.new - 1 * 3600 * 24
17
- puts "Getting changesets for #{from} - #{to}"
17
+ puts "Getting revisions for #{from} - #{to}"
18
18
 
19
- changesets = create_scm(nil, nil).changesets(nil, from, to)
20
- assert_equal(1, changesets.length)
21
- assert_equal(Time.utc(2004, 11, 30, 04, 52, 24), changesets[0][0].time)
22
- assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), changesets[0][1].time)
23
- assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), changesets[0].time)
24
- assert_equal("rinkrank", changesets[0].developer)
25
- assert_equal("En to\ntre buksa \nned\n", changesets[0].message)
19
+ revisions = create_scm(nil, nil).revisions(nil, from, to)
20
+ assert_equal(1, revisions.length)
21
+ assert_equal(Time.utc(2004, 11, 30, 04, 52, 24), revisions[0][0].time)
22
+ assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), revisions[0][1].time)
23
+ assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), revisions[0].time)
24
+ assert_equal("rinkrank", revisions[0].developer)
25
+ assert_equal("En to\ntre buksa \nned\n", revisions[0].message)
26
26
  end
27
27
 
28
28
  def test_checkout
@@ -28,83 +28,83 @@ else
28
28
  EOF
29
29
 
30
30
  def test_can_parse_SIMPLE_LOG_ENTRIES
31
- parser = SubversionLogEntryParser.new("damagecontrolled", "damagecontrolled")
31
+ parser = SubversionLogEntryParser.new("svn://foo/bar/zap/damagecontrolled")
32
32
  can_parse_simple_log_entry(parser, SIMPLE_LOG_ENTRY)
33
33
  can_parse_simple_log_entry(parser, SIMPLE_LOG_ENTRY_WITH_BACKSLASHES)
34
34
  end
35
35
 
36
36
  def can_parse_simple_log_entry(parser, entry)
37
- changeset = parser.parse(StringIO.new(entry)) {|line|}
38
-
39
- assert_equal(2, changeset.revision)
40
- assert_equal("ahelleso", changeset.developer)
41
- assert_equal(Time.utc(2004,7,11,13,29,35), changeset.time)
42
- assert_equal("changed something\nelse", changeset.message)
43
-
44
- assert_equal(2, changeset.length)
45
- assert_equal("build.xml", changeset[0].path)
46
- assert_equal(2, changeset[0].revision)
47
- assert_equal(Change::MODIFIED, changeset[0].status)
48
- assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", changeset[1].path)
49
- assert_equal(Change::MODIFIED, changeset[1].status)
37
+ revision = parser.parse(StringIO.new(entry)) {|line|}
38
+
39
+ assert_equal(2, revision.identifier)
40
+ assert_equal("ahelleso", revision.developer)
41
+ assert_equal(Time.utc(2004,7,11,13,29,35), revision.time)
42
+ assert_equal("changed something\nelse", revision.message)
43
+
44
+ assert_equal(2, revision.length)
45
+ assert_equal("build.xml", revision[0].path)
46
+ assert_equal(2, revision[0].native_revision_identifier)
47
+ assert_equal(RevisionFile::MODIFIED, revision[0].status)
48
+ assert_equal("src/java/com/thoughtworks/damagecontrolled/Thingy.java", revision[1].path)
49
+ assert_equal(RevisionFile::MODIFIED, revision[1].status)
50
50
  end
51
51
 
52
- def test_parses_entire_log_into_changesets
52
+ def test_parses_entire_log_into_revisions
53
53
  File.open(File.dirname(__FILE__) + "/svn-proxytoys.log") do |io|
54
- parser = SubversionLogParser.new(io, "trunk/proxytoys", nil)
54
+ parser = SubversionLogParser.new(io, "http://three/blind/mice/trunk/proxytoys")
55
55
 
56
- changesets = parser.parse_changesets
56
+ revisions = parser.parse_revisions
57
57
 
58
- assert_equal(66, changesets.length)
58
+ assert_equal(66, revisions.length)
59
59
  # just some random assertions
60
60
  assert_equal(
61
61
  "DecoratingInvoker now hands off to a SimpleInvoker rather than a DelegatingInvoker if constructed with an Object to decorate.\n" +
62
- "Added protected getDelegateMethod(name, params)\n", changesets[0].message)
62
+ "Added protected getDelegateMethod(name, params)\n", revisions[0].message)
63
63
 
64
- assert_equal(66, changesets[3].revision)
65
- assert_equal("tastapod", changesets[3].developer)
66
- assert_equal(Time.utc(2004,05,24,17,06,18,0), changesets[3].time)
67
- assert_match(/Factored delegating behaviour out/ , changesets[3].message)
68
- assert_equal(15, changesets[3].length)
64
+ assert_equal(66, revisions[3].revision)
65
+ assert_equal("tastapod", revisions[3].developer)
66
+ assert_equal(Time.utc(2004,05,24,17,06,18,0), revisions[3].time)
67
+ assert_match(/Factored delegating behaviour out/ , revisions[3].message)
68
+ assert_equal(15, revisions[3].length)
69
69
 
70
- assert_equal("src/com/thoughtworks/proxy/toys/delegate/DelegatingInvoker.java" , changesets[3][1].path)
71
- assert_equal(Change::ADDED , changesets[3][1].status)
72
- assert_equal(66 , changesets[3][1].revision)
73
- assert_equal(65, changesets[3][1].previous_revision)
70
+ assert_equal("src/com/thoughtworks/proxy/toys/delegate/DelegatingInvoker.java" , revisions[3][1].path)
71
+ assert_equal(RevisionFile::ADDED , revisions[3][1].status)
72
+ assert_equal(66 , revisions[3][1].revision)
73
+ assert_equal(65, revisions[3][1].previous_native_revision_identifier)
74
74
 
75
- assert_equal("src/com/thoughtworks/proxy/toys/delegate/ObjectReference.java" , changesets[3][3].path)
76
- assert_equal(Change::MOVED, changesets[3][3].status)
75
+ assert_equal("src/com/thoughtworks/proxy/toys/delegate/ObjectReference.java" , revisions[3][3].path)
76
+ assert_equal(RevisionFile::MOVED, revisions[3][3].status)
77
77
 
78
- assert_equal("src/com/thoughtworks/proxy/toys/delegate/OldDelegatingInvoker.java" , changesets[3][4].path)
79
- assert_equal(Change::DELETED, changesets[3][4].status)
78
+ assert_equal("src/com/thoughtworks/proxy/toys/delegate/OldDelegatingInvoker.java" , revisions[3][4].path)
79
+ assert_equal(RevisionFile::DELETED, revisions[3][4].status)
80
80
 
81
- assert_equal("test/com/thoughtworks/proxy/toys/echo/EchoingTest.java" , changesets[3][14].path)
82
- assert_equal(Change::MODIFIED , changesets[3][14].status)
81
+ assert_equal("test/com/thoughtworks/proxy/toys/echo/EchoingTest.java" , revisions[3][14].path)
82
+ assert_equal(RevisionFile::MODIFIED , revisions[3][14].status)
83
83
 
84
84
  end
85
85
  end
86
86
 
87
- def test_parses_entire_log_into_changesets
87
+ def test_parses_entire_log_into_revisions
88
88
  File.open(File.dirname(__FILE__) + "/svn-cargo.log") do |io|
89
- parser = SubversionLogParser.new(io, "trunk/proxytoys", nil)
90
- changesets = parser.parse_changesets
91
- assert_equal(16, changesets.length)
89
+ parser = SubversionLogParser.new(io, "svn://foo/cargo/trunk")
90
+ revisions = parser.parse_revisions
91
+ assert_equal(16, revisions.length)
92
92
  end
93
93
  end
94
94
 
95
95
  def test_parses_another_tricky_log
96
96
  File.open(File.dirname(__FILE__) + "/svn-growl.log") do |io|
97
- parser = SubversionLogParser.new(io, "trunk", nil)
98
- changesets = parser.parse_changesets
99
- assert_equal(82, changesets.length)
97
+ parser = SubversionLogParser.new(io, "svn://some/where/trunk")
98
+ revisions = parser.parse_revisions
99
+ assert_equal(82, revisions.length)
100
100
  end
101
101
  end
102
102
 
103
103
  def test_parses_log_with_spaces_in_file_names
104
104
  File.open(File.dirname(__FILE__) + "/svn-growl2.log") do |io|
105
- parser = SubversionLogParser.new(io, "trunk", nil)
106
- changesets = parser.parse_changesets
107
- change = changesets[1][0]
105
+ parser = SubversionLogParser.new(io, "svn://some/where/trunk")
106
+ revisions = parser.parse_revisions
107
+ change = revisions[1][0]
108
108
  assert_equal("Display Plugins/Bezel/English.lproj/GrowlBezelPrefs.nib/classes.nib", change.path)
109
109
  end
110
110
  end
@@ -118,9 +118,69 @@ nothing
118
118
  EOF
119
119
 
120
120
  def test_should_retrieve_head_revision
121
- parser = SubversionLogParser.new(StringIO.new(SVN_R_LOG_HEAD_DATA), "blah", nil)
122
- changesets = parser.parse_changesets
123
- assert_equal(48, changesets[0].revision)
121
+ parser = SubversionLogParser.new(StringIO.new(SVN_R_LOG_HEAD_DATA), "svn://foo/bar")
122
+ revisions = parser.parse_revisions
123
+ assert_equal(48, revisions[0].identifier)
124
+ end
125
+
126
+ SVN_XSTREAM_LOG = <<-EOF
127
+ ------------------------------------------------------------------------
128
+ r593 | joe | 2005-04-30 07:56:45 -0400 (Sat, 30 Apr 2005) | 1 line
129
+ Changed paths:
130
+ M /trunk/xstream/build.xml
131
+ M /trunk/xstream-website/src/content/download.html
132
+ M /trunk/xstream-website/src/content/news.html
133
+
134
+ Updated website for 1.1.2 release.
135
+ ------------------------------------------------------------------------
136
+ EOF
137
+
138
+ def test_should_filter_out_unwanted_entries
139
+ parser = SubversionLogParser.new(StringIO.new(SVN_XSTREAM_LOG), "svn://foo/trunk/xstream")
140
+ revisions = parser.parse_revisions
141
+ assert_equal(593, revisions[0].identifier)
142
+ assert_equal("build.xml", revisions[0][0].path)
143
+ assert_equal(1, revisions[0].length)
144
+ end
145
+
146
+ LOG_WITH_DIRS = <<-EOF
147
+ ------------------------------------------------------------------------
148
+ r1 | aslakhellesoy | 2005-05-03 18:27:14 -0400 (Tue, 03 May 2005) | 2 lines
149
+ Changed paths:
150
+ A /damagecontrolled
151
+ A /damagecontrolled/build.xml
152
+ A /damagecontrolled/project.xml
153
+ A /damagecontrolled/src
154
+ A /damagecontrolled/src/java
155
+ A /damagecontrolled/src/java/com
156
+ A /damagecontrolled/src/java/com/thoughtworks
157
+ A /damagecontrolled/src/java/com/thoughtworks/damagecontrolled
158
+ A /damagecontrolled/src/java/com/thoughtworks/damagecontrolled/Thingy.java
159
+ A /damagecontrolled/src/test
160
+ A /damagecontrolled/src/test/com
161
+ A /damagecontrolled/src/test/com/thoughtworks
162
+ A /damagecontrolled/src/test/com/thoughtworks/damagecontrolled
163
+ A /damagecontrolled/src/test/com/thoughtworks/damagecontrolled/ThingyTestCase.java
164
+
165
+ imported
166
+ sources
167
+ ------------------------------------------------------------------------
168
+ EOF
169
+
170
+ def test_should_ignore_directories
171
+ parser = SubversionLogParser.new(StringIO.new(LOG_WITH_DIRS), "svn://mooky/damagecontrolled")
172
+ revisions = parser.parse_revisions
173
+ assert_equal(1, revisions[0].identifier)
174
+ assert_equal(4, revisions[0].length)
175
+ end
176
+
177
+ def test_should_not_require_path
178
+ slep = SubversionLogEntryParser.new(nil)
179
+ url = "svn://svn.xstream.codehaus.org/xstream/scm/trunk/xstream"
180
+ assert_equal("build.xml", slep.relative_path(url, "trunk/xstream/build.xml"))
181
+ assert_equal("build.xml", slep.relative_path(url, "scm/trunk/xstream/build.xml"))
182
+ assert_equal("boo/build.xml", slep.relative_path(url, "trunk/xstream/boo/build.xml"))
183
+ assert_equal(nil, slep.relative_path(url, "trunk/xstream-website/boo/build.xml"))
124
184
  end
125
185
  end
126
186
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.6
2
+ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: rscm
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.1.1404
7
- date: 2005-03-10
6
+ version: 0.3.0
7
+ date: 2005-07-18
8
8
  summary: "RSCM - Ruby Source Control Management"
9
9
  require_paths:
10
10
  - lib
@@ -30,26 +30,25 @@ files:
30
30
  - CHANGELOG
31
31
  - Rakefile
32
32
  - README
33
- - lib/multipart.rb
34
33
  - lib/rscm
35
34
  - lib/rscm.rb
36
- - lib/rubyforge_file_publisher.rb
37
35
  - lib/rscm/abstract_log_parser.rb
38
- - lib/rscm/abstract_scm.rb
39
36
  - lib/rscm/annotations.rb
40
- - lib/rscm/changes.rb
41
- - lib/rscm/example.yaml
37
+ - lib/rscm/base.rb
38
+ - lib/rscm/better.rb
42
39
  - lib/rscm/line_editor.rb
43
40
  - lib/rscm/logging.rb
44
41
  - lib/rscm/parser.rb
45
42
  - lib/rscm/path_converter.rb
46
- - lib/rscm/RSS.txt
43
+ - lib/rscm/revision.rb
44
+ - lib/rscm/revision_file.rb
47
45
  - lib/rscm/scm
48
46
  - lib/rscm/time_ext.rb
49
47
  - lib/rscm/scm/clearcase.rb
50
48
  - lib/rscm/scm/cvs.rb
51
49
  - lib/rscm/scm/cvs_log_parser.rb
52
50
  - lib/rscm/scm/darcs.rb
51
+ - lib/rscm/scm/darcs_log_parser.rb
53
52
  - lib/rscm/scm/monotone.rb
54
53
  - lib/rscm/scm/monotone_log_parser.rb
55
54
  - lib/rscm/scm/mooky.rb
@@ -59,13 +58,11 @@ files:
59
58
  - lib/rscm/scm/subversion_log_parser.rb
60
59
  - bin/diff.exe
61
60
  - bin/Diff_StdDisclaimer.html
61
+ - bin/touch.exe
62
62
  - test/rscm
63
- - test/rscm/abstract_scm_test.rb
64
63
  - test/rscm/annotations_test.rb
65
64
  - test/rscm/apply_label_scm_tests.rb
66
- - test/rscm/changes_fixture.rb
67
- - test/rscm/changes_test.rb
68
- - test/rscm/changesets.yaml
65
+ - test/rscm/base_test.rb
69
66
  - test/rscm/difftool_test.rb
70
67
  - test/rscm/file_after_edit
71
68
  - test/rscm/file_ext.rb
@@ -76,17 +73,24 @@ files:
76
73
  - test/rscm/mockit_test.rb
77
74
  - test/rscm/parser_test.rb
78
75
  - test/rscm/path_converter_test.rb
76
+ - test/rscm/revision_fixture.rb
77
+ - test/rscm/revision_test.rb
78
+ - test/rscm/revisions.yaml
79
79
  - test/rscm/scm
80
80
  - test/rscm/tempdir.rb
81
+ - test/rscm/scm/clearcase.log
82
+ - test/rscm/scm/clearcase_test.rb
81
83
  - test/rscm/scm/cvs-dataforge.log
82
84
  - test/rscm/scm/cvs-test.log
83
85
  - test/rscm/scm/cvs_log_parser_test.rb
84
86
  - test/rscm/scm/cvs_test.rb
87
+ - test/rscm/scm/darcs_log_parser_test.rb
85
88
  - test/rscm/scm/darcs_test.rb
86
89
  - test/rscm/scm/keys
87
90
  - test/rscm/scm/monotone_log_parser_test.rb
88
91
  - test/rscm/scm/monotone_test.rb
89
92
  - test/rscm/scm/mooky_test.rb
93
+ - test/rscm/scm/p4client_test.rb
90
94
  - test/rscm/scm/perforce_test.rb
91
95
  - test/rscm/scm/star_team.rb
92
96
  - test/rscm/scm/subversion_log_parser_test.rb