pvn 0.0.8 → 0.0.9

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.
Files changed (40) hide show
  1. data/lib/pvn/app/runner.rb +2 -0
  2. data/lib/pvn/command/command.rb +0 -5
  3. data/lib/pvn/diff/{path_revision.rb → change.rb} +1 -1
  4. data/lib/pvn/diff/changed_paths.rb +64 -0
  5. data/lib/pvn/diff/differ.rb +2 -62
  6. data/lib/pvn/diff/local_differ.rb +5 -63
  7. data/lib/pvn/diff/local_path.rb +69 -0
  8. data/lib/pvn/diff/log_path.rb +145 -0
  9. data/lib/pvn/diff/log_paths.rb +16 -6
  10. data/lib/pvn/diff/name.rb +23 -0
  11. data/lib/pvn/diff/path.rb +51 -19
  12. data/lib/pvn/diff/repository_differ.rb +15 -123
  13. data/lib/pvn/diff/status_paths.rb +5 -27
  14. data/lib/pvn/pct/differ.rb +1 -1
  15. data/lib/pvn/pct/local_differ.rb +0 -1
  16. data/lib/pvn/pct/repository_differ.rb +17 -14
  17. data/lib/pvn/seek/command.rb +111 -0
  18. data/lib/pvn/seek/options.rb +21 -0
  19. data/lib/pvn/{pct → util}/diffcount.rb +0 -0
  20. data/lib/pvn.rb +1 -1
  21. data/lib/svnx/action.rb +20 -25
  22. data/test/integration/pvn/diff/changed_paths_test.rb +109 -0
  23. data/test/integration/pvn/diff/local_differ_test.rb +4 -4
  24. data/test/integration/pvn/diff/log_paths_test.rb +2 -2
  25. data/test/integration/pvn/diff/repository_differ_test.rb +4 -13
  26. data/test/integration/pvn/diff/status_paths_test.rb +7 -7
  27. data/test/integration/pvn/pct/local_differ_test.rb +21 -0
  28. data/test/integration/pvn/pct/repository_differ_test.rb +40 -0
  29. data/test/unit/pvn/diff/change_test.rb +43 -0
  30. data/test/unit/pvn/diff/path_test.rb +4 -4
  31. data/test/unit/svnx/action_test.rb +14 -43
  32. metadata +20 -17
  33. data/lib/pvn/diff/revision.rb +0 -36
  34. data/lib/system/cachecmd.rb +0 -65
  35. data/lib/system/cmdexec.rb +0 -13
  36. data/lib/system/cmdline.rb +0 -70
  37. data/lib/system/command.rb +0 -72
  38. data/test/integration/pvn/pct/command_test.rb +0 -30
  39. data/test/unit/pvn/diff/path_revision_test.rb +0 -45
  40. data/test/unit/pvn/diff/revision_test.rb +0 -35
@@ -1,45 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # -*- ruby -*-
3
-
4
- require 'tc'
5
- require 'pvn/diff/path_revision'
6
-
7
- module PVN::Diff
8
- ### $$$ yes, a lot of this is the same as Path; there is overlap as Path
9
- ### changes to a collection of PathRevisions
10
- class PathRevisionTestCase < PVN::TestCase
11
- def create_pathrev revision, action
12
- PathRevision.new revision, action
13
- end
14
-
15
- def assert_pathrev_revision exprevision, revision
16
- prev = create_pathrev revision, "added"
17
- assert_equal exprevision, prev.revision
18
- end
19
-
20
- def assert_pathrev_action expaction, action
21
- prev = create_pathrev "0", action
22
- assert_equal expaction, prev.action
23
- end
24
-
25
- def test_init_revision_string
26
- assert_pathrev_revision "0", "0"
27
- end
28
-
29
- def test_init_revision_integer
30
- assert_pathrev_revision "0", 0
31
- end
32
-
33
- def test_init_action_long_string
34
- assert_pathrev_action SVNx::Action.new(:added), "added"
35
- end
36
-
37
- def test_init_action_short_string
38
- assert_pathrev_action SVNx::Action.new(:deleted), "D"
39
- end
40
-
41
- def test_init_action_symbol
42
- assert_pathrev_action SVNx::Action.new(:modified), :modified
43
- end
44
- end
45
- end
@@ -1,35 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # -*- ruby -*-
3
-
4
- require 'tc'
5
- require 'pvn/diff/revision'
6
-
7
- module PVN::Diff
8
- class RevisionTestCase < PVN::TestCase
9
- def to_message change, revision
10
- "change: #{change}; revision: #{revision}"
11
- end
12
-
13
- def assert_revision_to_s expstr, change, revision
14
- rev = RevisionRange.new change, revision
15
- assert_equal expstr, rev.to_s, "change: #{change}; revision: #{revision}"
16
- end
17
-
18
- def assert_revision_gt exp, chgx, revx, chgy, revy
19
- x = RevisionRange.new chgx, revx
20
- y = RevisionRange.new chgx, revy
21
- msg = "x: #{to_message(chgx, revx)}; y: #{to_message(chgy, revy)}"
22
- info "x: #{x}".cyan
23
- info "y: #{y}".cyan
24
- assert_equal exp, x > y, msg
25
- end
26
-
27
- def test_change_str
28
- assert_revision_to_s '14:15', '15', nil
29
- end
30
-
31
- def test_revision_str
32
- assert_revision_to_s '14:15', nil, [ '14', '15' ]
33
- end
34
- end
35
- end