svn2git 2.3.1 → 2.3.2

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.
@@ -1,3 +1,11 @@
1
+ # 2.3.2 - 2014-06-08
2
+
3
+ This is a bugfix release. It fixes issues running with Windows using MRI ruby and fixes a problem with Ruby 1.8.7.
4
+
5
+ * Removed open4 dependency. svn2git no longer has any runtime dependencies and things work well on Windows again.
6
+ * Fixed an issue with Ruby 1.8.7, which doesn't implicitly require the 'thread' library meaning classes that library weren't in scope.
7
+
8
+
1
9
  # 2.3.1 - 2014-05-14
2
10
 
3
11
  This is a critical bugfix release if you're running git >= 1.8.3.2. In the days of svn2git 1.x we supported syncing
data/Rakefile CHANGED
@@ -12,7 +12,6 @@ begin
12
12
  spec.email = "nirvdrum@gmail.com"
13
13
  spec.license = 'MIT'
14
14
  spec.add_development_dependency 'minitest'
15
- spec.add_dependency 'open4'
16
15
  end
17
16
  Jeweler::GemcutterTasks.new
18
17
 
@@ -1,5 +1,5 @@
1
- ---
2
- :major: 2
3
- :minor: 3
4
- :patch: 1
1
+ ---
5
2
  :build:
3
+ :minor: 3
4
+ :patch: 2
5
+ :major: 2
@@ -1,7 +1,7 @@
1
1
  require 'optparse'
2
2
  require 'pp'
3
- require 'open4'
4
3
  require 'timeout'
4
+ require 'thread'
5
5
 
6
6
  module Svn2Git
7
7
  DEFAULT_AUTHORS_FILE = "~/.svn2git/authors"
@@ -374,7 +374,6 @@ module Svn2Git
374
374
  log "Running command: #{cmd}\n"
375
375
 
376
376
  ret = ''
377
- @mutex ||= Mutex.new
378
377
  @stdin_queue ||= Queue.new
379
378
 
380
379
  # We need to fetch input from the user to pass through to the underlying sub-process. We'll constantly listen
@@ -386,44 +385,28 @@ module Svn2Git
386
385
 
387
386
  # Open4 forks, which JRuby doesn't support. But JRuby added a popen4-compatible method on the IO class,
388
387
  # so we can use that instead.
389
- status = (defined?(JRUBY_VERSION) ? IO : Open4).popen4(cmd) do |pid, stdin, stdout, stderr|
388
+ IO.popen("2>&1 #{cmd}") do |output|
390
389
  threads = []
391
390
 
392
- threads << Thread.new(stdout) do |stdout|
393
- stdout.each do |line|
394
- @mutex.synchronize do
395
- ret << line
396
-
397
- if printout_output
398
- $stdout.print line
399
- else
400
- log line
401
- end
402
- end
403
- end
404
- end
405
-
406
- threads << Thread.new(stderr) do |stderr|
391
+ threads << Thread.new(output) do |output|
407
392
  # git-svn seems to do all of its prompting for user input via STDERR. When it prompts for input, it will
408
393
  # not terminate the line with a newline character, so we can't split the input up by newline. It will,
409
394
  # however, use a space to separate the user input from the prompt. So we split on word boundaries here
410
395
  # while draining STDERR.
411
- stderr.each(' ') do |word|
412
- @mutex.synchronize do
413
- ret << word
414
-
415
- if printout_output
416
- $stdout.print word
417
- else
418
- log word
419
- end
396
+ output.each(' ') do |word|
397
+ ret << word
398
+
399
+ if printout_output
400
+ $stdout.print word
401
+ else
402
+ log word
420
403
  end
421
404
  end
422
405
  end
423
406
 
424
407
  # Simple pass-through thread to take anything the user types via STDIN and passes it through to the
425
408
  # sub-process's stdin pipe.
426
- Thread.new(stdin) do |stdin|
409
+ Thread.new do
427
410
  loop do
428
411
  user_reply = @stdin_queue.pop
429
412
 
@@ -441,12 +424,7 @@ module Svn2Git
441
424
  @stdin_queue << nil
442
425
  end
443
426
 
444
- # JRuby's open4 doesn't return a Process::Status object when invoked with a block, but rather returns the
445
- # block expression's value. The Process::Status is stored as $?, so we need to normalize the status
446
- # object if on JRuby.
447
- status = $? if defined?(JRUBY_VERSION)
448
-
449
- if exit_on_error && (status.exitstatus != 0)
427
+ if exit_on_error && $?.exitstatus != 0
450
428
  $stderr.puts "command failed:\n#{cmd}"
451
429
  exit -1
452
430
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{svn2git}
8
- s.version = "2.3.1"
8
+ s.version = "2.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Coglan", "Kevin Menard"]
12
- s.date = %q{2014-05-15}
12
+ s.date = %q{2014-06-08}
13
13
  s.default_executable = %q{svn2git}
14
14
  s.email = %q{nirvdrum@gmail.com}
15
15
  s.executables = ["svn2git"]
@@ -42,14 +42,11 @@ Gem::Specification.new do |s|
42
42
 
43
43
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
44
  s.add_development_dependency(%q<minitest>, [">= 0"])
45
- s.add_runtime_dependency(%q<open4>, [">= 0"])
46
45
  else
47
46
  s.add_dependency(%q<minitest>, [">= 0"])
48
- s.add_dependency(%q<open4>, [">= 0"])
49
47
  end
50
48
  else
51
49
  s.add_dependency(%q<minitest>, [">= 0"])
52
- s.add_dependency(%q<open4>, [">= 0"])
53
50
  end
54
51
  end
55
52
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svn2git
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 1
10
- version: 2.3.1
9
+ - 2
10
+ version: 2.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Coglan
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2014-05-15 00:00:00 -04:00
19
+ date: 2014-06-08 00:00:00 -04:00
20
20
  default_executable: svn2git
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -33,20 +33,6 @@ dependencies:
33
33
  version: "0"
34
34
  type: :development
35
35
  version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: open4
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- type: :runtime
49
- version_requirements: *id002
50
36
  description:
51
37
  email: nirvdrum@gmail.com
52
38
  executables: