svn2git 2.3.0 → 2.3.1
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.
- data/ChangeLog.markdown +25 -1
- data/Rakefile +2 -1
- data/VERSION.yml +1 -1
- data/lib/svn2git/migration.rb +36 -4
- data/svn2git.gemspec +15 -13
- data/test/commands_test.rb +9 -0
- data/test/escape_quotes_test.rb +1 -1
- data/test/test_helper.rb +9 -1
- metadata +67 -45
- checksums.yaml +0 -7
data/ChangeLog.markdown
CHANGED
@@ -1,4 +1,27 @@
|
|
1
|
+
# 2.3.1 - 2014-05-14
|
2
|
+
|
3
|
+
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
|
4
|
+
local branches with upstream by tracking the branch as we set them up. This allowed one to checkout the branch and
|
5
|
+
issue a "git pull" to fetch the changes. git-svn ceased allowing this in 1.8.3.2, which broke svn2git with that
|
6
|
+
version of git and all subsequent versions. The rationale seemed to be in order to prevent pushing changes from
|
7
|
+
git-svn back up and breaking the remote link, but this was never something svn2git supported anyway.
|
8
|
+
|
9
|
+
Acknowledging the new reality of upstream, the old behavior is retained but deprecated for users of git < 1.8.3.2.
|
10
|
+
We'll be removing the establishment of remote tracking SVN branches in the 2.5.0 release. If you wish to sync back
|
11
|
+
with upstream, run `svn2git --rebase`. If you're on git >= 1.8.3.2 your only option for resynchronizing is to
|
12
|
+
use `svn2git --rebase`.
|
13
|
+
|
14
|
+
Many thanks to ktdreyer for modernizing the test suite and Daniel Ruf (DanielRuf) for pushing on the git compatibility
|
15
|
+
issue.
|
16
|
+
|
17
|
+
* Fixed creating local branches for remote SVN branches in git >= 1.8.3.2.
|
18
|
+
* Fixed verbose logging of sub-process STDERR stream.
|
19
|
+
* Added MIT license metadata to gemspec.
|
20
|
+
* Switched to minitest to get tests working on Ruby 1.9+ with minitest 5+ installed.
|
21
|
+
|
22
|
+
|
1
23
|
# 2.3.0 - 2014-05-14
|
24
|
+
|
2
25
|
This release passes STDIN through to the underlying git-svn process, allowing users to interact with the
|
3
26
|
git-svn prompt. Principally, it will allow users to choose what to do when prompted about unverified
|
4
27
|
SSL certificates.
|
@@ -6,6 +29,7 @@
|
|
6
29
|
* Pass STDIN through to the underlying git-svn process so users can respond to prompts.
|
7
30
|
|
8
31
|
# 2.2.5 - 2014-03-09
|
32
|
+
|
9
33
|
This is a bugfix release. It improves handling of quotes in SVN commit messages.
|
10
34
|
|
11
35
|
|
@@ -20,7 +44,7 @@
|
|
20
44
|
|
21
45
|
# 2.2.3 - 2014-03-08
|
22
46
|
|
23
|
-
This is a bugfix release. First change done by FeeJai
|
47
|
+
This is a bugfix release. First change done by FeeJai.
|
24
48
|
|
25
49
|
* Fixed an issue with password protected svn-repositories. The prompt to enter the password is now displayed.
|
26
50
|
* Fixed an issue with server certificates. If the certificate is untrusted, the prompt to confirm or deny the certificate is now shown.
|
data/Rakefile
CHANGED
@@ -10,7 +10,8 @@ begin
|
|
10
10
|
spec.authors = ["James Coglan", "Kevin Menard"]
|
11
11
|
spec.homepage = "https://github.com/nirvdrum/svn2git"
|
12
12
|
spec.email = "nirvdrum@gmail.com"
|
13
|
-
spec.
|
13
|
+
spec.license = 'MIT'
|
14
|
+
spec.add_development_dependency 'minitest'
|
14
15
|
spec.add_dependency 'open4'
|
15
16
|
end
|
16
17
|
Jeweler::GemcutterTasks.new
|
data/VERSION.yml
CHANGED
data/lib/svn2git/migration.rb
CHANGED
@@ -155,6 +155,10 @@ module Svn2Git
|
|
155
155
|
Svn2Git::Migration.escape_quotes(str)
|
156
156
|
end
|
157
157
|
|
158
|
+
def self.checkout_svn_branch(branch)
|
159
|
+
"git checkout -b \"#{branch}\" \"remotes/svn/#{branch}\""
|
160
|
+
end
|
161
|
+
|
158
162
|
private
|
159
163
|
|
160
164
|
def clone!
|
@@ -318,8 +322,36 @@ module Svn2Git
|
|
318
322
|
end
|
319
323
|
|
320
324
|
next if branch == 'trunk' || @local.include?(branch)
|
321
|
-
|
322
|
-
|
325
|
+
|
326
|
+
if @cannot_setup_tracking_information
|
327
|
+
run_command(Svn2Git::Migration.checkout_svn_branch(branch))
|
328
|
+
else
|
329
|
+
status = run_command("git branch --track \"#{branch}\" \"remotes/svn/#{branch}\"", false)
|
330
|
+
|
331
|
+
# As of git 1.8.3.2, tracking information cannot be set up for remote SVN branches:
|
332
|
+
# http://git.661346.n2.nabble.com/git-svn-Use-prefix-by-default-td7594288.html#a7597159
|
333
|
+
#
|
334
|
+
# Older versions of git can do it and it should be safe as long as remotes aren't pushed.
|
335
|
+
# Our --rebase option obviates the need for read-only tracked remotes, however. So, we'll
|
336
|
+
# deprecate the old option, informing those relying on the old behavior that they should
|
337
|
+
# use the newer --rebase otion.
|
338
|
+
if status =~ /Cannot setup tracking information/m
|
339
|
+
@cannot_setup_tracking_information = true
|
340
|
+
run_command(Svn2Git::Migration.checkout_svn_branch(branch))
|
341
|
+
else
|
342
|
+
unless @legacy_svn_branch_tracking_message_displayed
|
343
|
+
warn '*' * 68
|
344
|
+
warn "svn2git warning: Tracking remote SVN branches is deprecated."
|
345
|
+
warn "In a future release local branches will be created without tracking."
|
346
|
+
warn "If you must resync your branches, run: svn2git --rebase"
|
347
|
+
warn '*' * 68
|
348
|
+
end
|
349
|
+
|
350
|
+
@legacy_svn_branch_tracking_message_displayed = true
|
351
|
+
|
352
|
+
run_command("git checkout \"#{branch}\"")
|
353
|
+
end
|
354
|
+
end
|
323
355
|
end
|
324
356
|
end
|
325
357
|
|
@@ -339,7 +371,7 @@ module Svn2Git
|
|
339
371
|
end
|
340
372
|
|
341
373
|
def run_command(cmd, exit_on_error=true, printout_output=false)
|
342
|
-
log "Running command: #{cmd}"
|
374
|
+
log "Running command: #{cmd}\n"
|
343
375
|
|
344
376
|
ret = ''
|
345
377
|
@mutex ||= Mutex.new
|
@@ -423,7 +455,7 @@ module Svn2Git
|
|
423
455
|
end
|
424
456
|
|
425
457
|
def log(msg)
|
426
|
-
|
458
|
+
print msg if @options[:verbose]
|
427
459
|
end
|
428
460
|
|
429
461
|
def show_help_message(msg)
|
data/svn2git.gemspec
CHANGED
@@ -2,17 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: svn2git 2.3.0 ruby lib
|
6
5
|
|
7
6
|
Gem::Specification.new do |s|
|
8
|
-
s.name =
|
9
|
-
s.version = "2.3.
|
7
|
+
s.name = %q{svn2git}
|
8
|
+
s.version = "2.3.1"
|
10
9
|
|
11
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib"]
|
13
11
|
s.authors = ["James Coglan", "Kevin Menard"]
|
14
|
-
s.date =
|
15
|
-
s.
|
12
|
+
s.date = %q{2014-05-15}
|
13
|
+
s.default_executable = %q{svn2git}
|
14
|
+
s.email = %q{nirvdrum@gmail.com}
|
16
15
|
s.executables = ["svn2git"]
|
17
16
|
s.extra_rdoc_files = [
|
18
17
|
"ChangeLog.markdown",
|
@@ -28,25 +27,28 @@ Gem::Specification.new do |s|
|
|
28
27
|
"lib/svn2git.rb",
|
29
28
|
"lib/svn2git/migration.rb",
|
30
29
|
"svn2git.gemspec",
|
30
|
+
"test/commands_test.rb",
|
31
31
|
"test/escape_quotes_test.rb",
|
32
32
|
"test/test_helper.rb"
|
33
33
|
]
|
34
|
-
s.homepage =
|
35
|
-
s.
|
36
|
-
s.
|
34
|
+
s.homepage = %q{https://github.com/nirvdrum/svn2git}
|
35
|
+
s.licenses = ["MIT"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = %q{1.6.2}
|
38
|
+
s.summary = %q{A tool for migrating svn projects to git}
|
37
39
|
|
38
40
|
if s.respond_to? :specification_version then
|
39
|
-
s.specification_version =
|
41
|
+
s.specification_version = 3
|
40
42
|
|
41
43
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
42
|
-
s.add_development_dependency(%q<
|
44
|
+
s.add_development_dependency(%q<minitest>, [">= 0"])
|
43
45
|
s.add_runtime_dependency(%q<open4>, [">= 0"])
|
44
46
|
else
|
45
|
-
s.add_dependency(%q<
|
47
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
46
48
|
s.add_dependency(%q<open4>, [">= 0"])
|
47
49
|
end
|
48
50
|
else
|
49
|
-
s.add_dependency(%q<
|
51
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
50
52
|
s.add_dependency(%q<open4>, [">= 0"])
|
51
53
|
end
|
52
54
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.expand_path(File.join(__FILE__, '..', 'test_helper'))
|
2
|
+
|
3
|
+
class CommandsTest < Minitest::Test
|
4
|
+
def test_checkout_svn_branch
|
5
|
+
actual = Svn2Git::Migration.checkout_svn_branch('blah')
|
6
|
+
|
7
|
+
assert_equal 'git checkout -b "blah" "remotes/svn/blah"', actual
|
8
|
+
end
|
9
|
+
end
|
data/test/escape_quotes_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.join(__FILE__, '..', 'test_helper'))
|
2
2
|
|
3
|
-
class EscapeQuotesTest < Test
|
3
|
+
class EscapeQuotesTest < Minitest::Test
|
4
4
|
def test_identity
|
5
5
|
expected = 'A string without any need to escape.'
|
6
6
|
actual = Svn2Git::Migration.escape_quotes(expected)
|
data/test/test_helper.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
$:.unshift "#{File.dirname(__FILE__)}/../lib"
|
2
2
|
|
3
|
+
require 'rubygems'
|
3
4
|
require 'svn2git'
|
4
|
-
require '
|
5
|
+
require 'minitest/autorun'
|
6
|
+
|
7
|
+
if Minitest.const_defined?('Test')
|
8
|
+
# We're on Minitest 5+. Nothing to do here.
|
9
|
+
else
|
10
|
+
# Minitest 4 doesn't have Minitest::Test yet.
|
11
|
+
Minitest::Test = MiniTest::Unit::TestCase
|
12
|
+
end
|
metadata
CHANGED
@@ -1,53 +1,62 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: svn2git
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 3
|
9
|
+
- 1
|
10
|
+
version: 2.3.1
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- James Coglan
|
8
14
|
- Kevin Menard
|
9
15
|
autorequire:
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :development
|
18
|
+
|
19
|
+
date: 2014-05-15 00:00:00 -04:00
|
20
|
+
default_executable: svn2git
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: minitest
|
22
24
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
25
28
|
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
34
|
+
type: :development
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
29
37
|
name: open4
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :runtime
|
36
38
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
39
42
|
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
42
50
|
description:
|
43
51
|
email: nirvdrum@gmail.com
|
44
|
-
executables:
|
52
|
+
executables:
|
45
53
|
- svn2git
|
46
54
|
extensions: []
|
47
|
-
|
55
|
+
|
56
|
+
extra_rdoc_files:
|
48
57
|
- ChangeLog.markdown
|
49
58
|
- README.markdown
|
50
|
-
files:
|
59
|
+
files:
|
51
60
|
- ChangeLog.markdown
|
52
61
|
- MIT-LICENSE
|
53
62
|
- README.markdown
|
@@ -57,29 +66,42 @@ files:
|
|
57
66
|
- lib/svn2git.rb
|
58
67
|
- lib/svn2git/migration.rb
|
59
68
|
- svn2git.gemspec
|
69
|
+
- test/commands_test.rb
|
60
70
|
- test/escape_quotes_test.rb
|
61
71
|
- test/test_helper.rb
|
72
|
+
has_rdoc: true
|
62
73
|
homepage: https://github.com/nirvdrum/svn2git
|
63
|
-
licenses:
|
64
|
-
|
74
|
+
licenses:
|
75
|
+
- MIT
|
65
76
|
post_install_message:
|
66
77
|
rdoc_options: []
|
67
|
-
|
78
|
+
|
79
|
+
require_paths:
|
68
80
|
- lib
|
69
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
71
84
|
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
76
93
|
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
hash: 3
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
79
99
|
requirements: []
|
100
|
+
|
80
101
|
rubyforge_project:
|
81
|
-
rubygems_version:
|
102
|
+
rubygems_version: 1.6.2
|
82
103
|
signing_key:
|
83
|
-
specification_version:
|
104
|
+
specification_version: 3
|
84
105
|
summary: A tool for migrating svn projects to git
|
85
106
|
test_files: []
|
107
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 2b945b1a4df0af0d51a1c7d5662528c79975bf8c
|
4
|
-
data.tar.gz: 0ce18a7123508f6368250867884714cfa0589865
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 7262ee9fedddbdc47119bfba8e4aee8373bac52c6dec3ffccb50346697936ed6e2cc65a9a0d9b4aef16b0975dc1c545412d77b40dec750e85838bc2ce7980299
|
7
|
-
data.tar.gz: aa518ed21531bc16d70ab39f48af4d78b4e2e651e1c2271c7f3d0b2f395b94d33c9393ea2e0cdd26af35cf46f0be61b077c2b708b61d887730f3926e696f8c82
|