pvn 0.0.6 → 0.0.7

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.
@@ -31,73 +31,4 @@ module PVN::Subcommands::Pct
31
31
  diff_counts
32
32
  end
33
33
  end
34
-
35
- class RepositoryDiffer < Differ
36
- ### $$$ this belongs in Revision
37
- def get_from_to_revisions rev
38
- if rev.kind_of? Array
39
- if rev.size == 1
40
- if md = Regexp.new('(.+):(.+)').match(rev[0])
41
- return [ md[1], md[2] ]
42
- else
43
- return [ (rev[0].to_i - 1).to_s, rev[0] ]
44
- end
45
- else
46
- return [ rev[0], rev[1] ]
47
- end
48
- else
49
- info "rev: #{rev}".bold.white.on_red
50
- end
51
- end
52
-
53
- def get_line_count path, revision
54
- info "path: #{path}".yellow
55
- cmdargs = SVNx::CatCommandArgs.new :path => path, :revision => revision
56
- catcmd = SVNx::CatCommand.new cmdargs
57
- catcmd.execute.size
58
- end
59
-
60
- def get_diff_counts path, options
61
- diff_counts = Array.new
62
-
63
- revision = options.revision
64
-
65
- elmt = PVN::IO::Element.new :local => path
66
- modified = elmt.find_modified_entries revision
67
-
68
- modnames = modified.collect { |m| m.name }.sort.uniq
69
-
70
- fromrev, torev = get_from_to_revisions revision
71
-
72
- reporoot = elmt.repo_root
73
-
74
- direlmt = PVN::IO::Element.new :local => '.'
75
- svninfo = direlmt.get_info
76
-
77
- filter = svninfo.url.dup
78
- filter.slice! svninfo.root
79
- info "filter: #{filter}"
80
- filterre = Regexp.new '^' + filter + '/'
81
-
82
- modnames.each do |mod|
83
- fullpath = reporoot + mod
84
- elmt = PVN::IO::Element.new :path => fullpath
85
-
86
- next unless elmt.has_revision? fromrev
87
- next unless elmt.has_revision? torev
88
- next if elmt.get_info.kind == 'dir'
89
-
90
- from_count = get_line_count fullpath, fromrev
91
- to_count = get_line_count fullpath, torev
92
-
93
- name = mod.dup
94
- name.slice! filterre
95
-
96
- dc = PVN::DiffCount.new from_count, to_count, name
97
- diff_counts << dc
98
- end
99
-
100
- diff_counts
101
- end
102
- end
103
34
  end
@@ -68,7 +68,7 @@ module PVN::Revision
68
68
  end
69
69
 
70
70
  def test_negative_too_far_back
71
- assert_revision_entry_raises -35
71
+ assert_revision_entry_raises(-35)
72
72
  end
73
73
 
74
74
  def test_negative_most_recent_as_string
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pvn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Pace