rscm 0.1.0.1337 → 0.1.0.1338

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -56,6 +56,7 @@ end
56
56
  PKG_FILES = FileList[
57
57
  '[A-Z]*',
58
58
  'lib/**/*',
59
+ 'bin/**/*',
59
60
  'test/**/*',
60
61
  'testproject/**/*',
61
62
  'doc/**/*',
@@ -0,0 +1,24 @@
1
+ <html>
2
+
3
+ <head>
4
+ <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
5
+ <title>Disclaimer</title>
6
+ </head>
7
+
8
+ <body bgcolor="#FD8698">
9
+
10
+ <h2 align="center">Disclaimer (from <a href="http://unxutils.sourceforge.net/">http://unxutils.sourceforge.net/</a>)</h2>
11
+
12
+ <p align="left">THIS SOFTWARE IS PROVIDED &quot;AS IS&quot; AND ANY EXPRESSED OR IMPLIED
13
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
14
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE&nbsp; CONTRIBUTORS
15
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
17
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br>
18
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
19
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
21
+
22
+ <p><a href="mailto:syring@web.de"><font face="Trebuchet MS">Karl M. Syring</font></a></p>
23
+ </body>
24
+ </html>
Binary file
@@ -0,0 +1,36 @@
1
+ class Class
2
+
3
+ # Defines a description "meta attribute" on the class for the next
4
+ # attr_reader or attr_accessor. Example:
5
+ #
6
+ # TODO: take from test case
7
+ #
8
+ def desc(s, suffix=nil)
9
+ $attr_desc = s
10
+ end
11
+
12
+ alias old_attr_reader attr_reader
13
+ def attr_reader(*syms) #:nodoc:
14
+ syms.each do |sym|
15
+ class_eval <<-EOS
16
+ @@#{sym.id2name}_desc = $attr_desc
17
+
18
+ def self.#{sym.id2name}_desc
19
+ @@#{sym}_desc
20
+ end
21
+
22
+ def #{sym.id2name}_desc
23
+ @@#{sym}_desc
24
+ end
25
+ EOS
26
+ end
27
+ $attr_desc = nil
28
+ old_attr_reader(*syms)
29
+ end
30
+
31
+ def attr_accessor(*syms) #:nodoc:
32
+ attr_reader(*syms)
33
+ attr_writer(*syms)
34
+ end
35
+
36
+ end
@@ -7,7 +7,7 @@ module RSCM
7
7
 
8
8
  # RSCM implementation for CVS.
9
9
  #
10
- # You need the cvs executable on the PATH in order for it to work.
10
+ # You need a cvs executable on the PATH in order for it to work.
11
11
  #
12
12
  # NOTE: On Cygwin this has to be the win32 build of cvs and not the Cygwin one.
13
13
  class CVS < AbstractSCM
@@ -91,11 +91,7 @@ module RSCM
91
91
 
92
92
  def changesets(checkout_dir, from_identifier, to_identifier=Time.infinity, files=nil)
93
93
  checkout(checkout_dir) unless uptodate?(checkout_dir, nil) # must checkout to get changesets
94
- begin
95
- parse_log(checkout_dir, new_changes_command(from_identifier, to_identifier, files))
96
- rescue => e
97
- parse_log(checkout_dir, old_changes_command(from_identifier, to_identifier, files))
98
- end
94
+ parse_log(checkout_dir, changes_command(from_identifier, to_identifier, files))
99
95
  end
100
96
 
101
97
  def diff(checkout_dir, change)
@@ -105,7 +101,7 @@ module RSCM
105
101
  when /#{Change::DELETED}/; "#{revision_option(change.previous_revision)}"
106
102
  when /#{Change::ADDED}/; "#{revision_option(Time.epoch)} #{revision_option(change.revision)}"
107
103
  end
108
- # IPORTANT! CVS NT has a bug in the -N diff option
104
+ # IMPORTANT! CVS NT has a bug in the -N diff option
109
105
  # http://www.cvsnt.org/pipermail/cvsnt-bugs/2004-November/000786.html
110
106
  cmd = command_line("diff -Nu #{opts} #{change.path}")
111
107
  safer_popen(cmd, "r", 1) do |io|
@@ -239,11 +235,10 @@ module RSCM
239
235
  changesets
240
236
  end
241
237
 
242
- def new_changes_command(from_identifier, to_identifier, files)
238
+ def changes_command(from_identifier, to_identifier, files)
243
239
  # https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_16.html#SEC144
244
240
  # -N => Suppress the header if no revisions are selected.
245
- # -S => Do not print the list of tags for this file.
246
- "log #{branch_option} -N -S #{period_option(from_identifier, to_identifier)}"
241
+ "log #{branch_option} -N #{period_option(from_identifier, to_identifier)}"
247
242
  end
248
243
 
249
244
  def branch_specified?
@@ -262,11 +257,6 @@ module RSCM
262
257
  "checkout #{branch_option} -d #{target_dir} #{mod} #{revision_option(to_identifier)}"
263
258
  end
264
259
 
265
- def old_changes_command(from_identifier, to_identifier, files)
266
- # Many servers don't support the new -S option
267
- "log #{branch_option} -N #{period_option(from_identifier, to_identifier)}"
268
- end
269
-
270
260
  def hidden_password
271
261
  if(password && password != "")
272
262
  "********"
@@ -354,10 +344,4 @@ module RSCM
354
344
  end
355
345
  end
356
346
  end
357
-
358
- # Convenience factory method used in testing
359
- def CVS.local(cvsroot_dir, mod)
360
- cvsroot_dir = PathConverter.filepath_to_nativepath(cvsroot_dir, true)
361
- CVS.new(":local:#{cvsroot_dir}", mod)
362
- end
363
347
  end
@@ -0,0 +1,32 @@
1
+ require 'test/unit'
2
+ require 'rscm/attr_attr'
3
+
4
+ module RSCM
5
+ class Whatever
6
+ desc "huba luba"
7
+ attr_accessor :foo
8
+
9
+ attr_accessor :ping
10
+
11
+ desc "bang bang"
12
+ attr_accessor :bar, :zap
13
+ end
14
+
15
+ class AttrAttrTest < Test::Unit::TestCase
16
+ def test_should_allow_attr_attr_description
17
+ assert_equal("huba luba", Whatever.foo_desc)
18
+ assert_nil(Whatever.ping_desc)
19
+ assert_equal("bang bang", Whatever.bar_desc)
20
+ assert_equal("bang bang", Whatever.zap_desc)
21
+ end
22
+
23
+ def TODOtest_should_allow_attr_value_attr_description
24
+ whatever = Whatever.new
25
+
26
+ assert_equal("huba luba", whatever.foo._desc)
27
+ assert_nil(whatever.ping._desc)
28
+ assert_equal("bang bang", whatever.bar._desc)
29
+ assert_equal("bang bang", whatever.zap._desc)
30
+ end
31
+ end
32
+ end
@@ -1,8 +1,18 @@
1
1
  require 'test/unit'
2
+ require 'rscm/path_converter'
2
3
  require 'rscm/cvs/cvs'
3
4
  require 'rscm/generic_scm_tests'
4
5
 
5
6
  module RSCM
7
+
8
+ class CVS
9
+ # Convenience factory method used in testing
10
+ def CVS.local(cvsroot_dir, mod)
11
+ cvsroot_dir = PathConverter.filepath_to_nativepath(cvsroot_dir, true)
12
+ CVS.new(":local:#{cvsroot_dir}", mod)
13
+ end
14
+ end
15
+
6
16
  class CVSTest < Test::Unit::TestCase
7
17
 
8
18
  include GenericSCMTests
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.4
3
3
  specification_version: 1
4
4
  name: rscm
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0.1337
7
- date: 2005-02-20
6
+ version: 0.1.0.1338
7
+ date: 2005-02-24
8
8
  summary: "RSCM - Ruby Source Control Management"
9
9
  require_paths:
10
10
  - lib
@@ -35,6 +35,7 @@ files:
35
35
  - lib/rubyforge_file_publisher.rb
36
36
  - lib/rscm/abstract_log_parser.rb
37
37
  - lib/rscm/abstract_scm.rb
38
+ - lib/rscm/attr_attr.rb
38
39
  - lib/rscm/changes.rb
39
40
  - lib/rscm/cvs
40
41
  - lib/rscm/darcs
@@ -59,10 +60,13 @@ files:
59
60
  - lib/rscm/starteam/starteam.rb
60
61
  - lib/rscm/svn/svn.rb
61
62
  - lib/rscm/svn/svn_log_parser.rb
63
+ - bin/diff.exe
64
+ - bin/Diff_StdDisclaimer.html
62
65
  - test/actual
63
66
  - test/expected
64
67
  - test/rscm
65
68
  - test/rscm/apply_label_scm_tests.rb
69
+ - test/rscm/attr_attr_test.rb
66
70
  - test/rscm/changes_fixture.rb
67
71
  - test/rscm/changes_test.rb
68
72
  - test/rscm/changesets.yaml