svn2git 2.1.0 → 2.1.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.
- data/ChangeLog.markdown +10 -0
- data/README.markdown +9 -5
- data/VERSION.yml +3 -3
- data/lib/svn2git/migration.rb +13 -7
- data/svn2git.gemspec +7 -8
- metadata +20 -40
data/ChangeLog.markdown
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 2.1.2 - 2011-12-28
|
2
|
+
|
3
|
+
* Fixed a regression in improperly quoting branch names (thanks ziangsong)
|
4
|
+
|
5
|
+
# 2.1.1 - 2011-12-27
|
6
|
+
|
7
|
+
* Fixed SVN branch detection (thanks thinkerbot)
|
8
|
+
* Stop processing when a git subprocess fails (thanks thinkerbot)
|
9
|
+
* Fixed an issue with SVN branches containing shell special characters (thanks sleicht)
|
10
|
+
|
1
11
|
# 2.1.0 - 2011-04-03
|
2
12
|
|
3
13
|
Thanks to Francois Rey (fmjrey), Sven Axelsson (svenax), and Julian Taylor (juliantaylor) for submitting all the patches
|
data/README.markdown
CHANGED
@@ -64,12 +64,16 @@ the svn repo.
|
|
64
64
|
Installation
|
65
65
|
------------
|
66
66
|
|
67
|
-
Make sure you have git,
|
67
|
+
Make sure you have git, git-svn, and ruby installed. svn2git is a ruby wrapper around git's native SVN support through git-svn. It is possible to have git
|
68
|
+
installed without git-svn installed, so please do verify that you can run `$ git svn` successfully. For a Debian-based system, the installation of the
|
69
|
+
prerequisites would like like:
|
68
70
|
|
69
71
|
$ sudo apt-get install git-core git-svn ruby rubygems
|
70
|
-
|
71
|
-
|
72
|
-
|
72
|
+
|
73
|
+
Once you have the necessary software your system, you can install svn2git through rubygems, which will add the `svn2git` command to your PATH.
|
74
|
+
|
75
|
+
$ sudo gem install svn2git
|
76
|
+
|
73
77
|
|
74
78
|
Usage
|
75
79
|
-----
|
@@ -204,7 +208,7 @@ FAQ
|
|
204
208
|
|
205
209
|
If we were to reference the parent of this svn tagged commit there could
|
206
210
|
potentially be situations where a developer would checkout a tag in git
|
207
|
-
and the resulting code base would be different
|
211
|
+
and the resulting code base would be different than if they checked out
|
208
212
|
that very same tag in the original svn repo. This is only due to the fact
|
209
213
|
that the svn tags allow changesets in them, making them not just annotated
|
210
214
|
tags.
|
data/VERSION.yml
CHANGED
data/lib/svn2git/migration.rb
CHANGED
@@ -178,7 +178,7 @@ module Svn2Git
|
|
178
178
|
run_command(cmd)
|
179
179
|
end
|
180
180
|
|
181
|
-
run_command("git config svn.authorsfile #{authors}") unless authors.nil?
|
181
|
+
run_command("git config --local svn.authorsfile #{authors}") unless authors.nil?
|
182
182
|
|
183
183
|
cmd = "git svn fetch "
|
184
184
|
cmd += "-r #{revision}:HEAD " unless revision.nil?
|
@@ -224,8 +224,8 @@ module Svn2Git
|
|
224
224
|
end
|
225
225
|
|
226
226
|
def fix_branches
|
227
|
-
svn_branches = @remote
|
228
|
-
svn_branches
|
227
|
+
svn_branches = @remote - @tags
|
228
|
+
svn_branches.delete_if { |b| b.strip !~ %r{^svn\/} }
|
229
229
|
|
230
230
|
if @options[:rebase]
|
231
231
|
run_command("git svn fetch")
|
@@ -236,14 +236,14 @@ module Svn2Git
|
|
236
236
|
if @options[:rebase] && (@local.include?(branch) || branch == 'trunk')
|
237
237
|
lbranch = branch
|
238
238
|
lbranch = 'master' if branch == 'trunk'
|
239
|
-
run_command("git checkout -f #{lbranch}")
|
240
|
-
run_command("git rebase remotes/svn/#{branch}")
|
239
|
+
run_command("git checkout -f \"#{lbranch}\"")
|
240
|
+
run_command("git rebase \"remotes/svn/#{branch}\"")
|
241
241
|
next
|
242
242
|
end
|
243
243
|
|
244
244
|
next if branch == 'trunk' || @local.include?(branch)
|
245
|
-
run_command("git branch --track #{branch} remotes/svn/#{branch}")
|
246
|
-
run_command("git checkout #{branch}")
|
245
|
+
run_command("git branch --track \"#{branch}\" \"remotes/svn/#{branch}\"")
|
246
|
+
run_command("git checkout \"#{branch}\"")
|
247
247
|
end
|
248
248
|
end
|
249
249
|
|
@@ -267,6 +267,7 @@ module Svn2Git
|
|
267
267
|
|
268
268
|
ret = ''
|
269
269
|
|
270
|
+
cmd = "2>&1 #{cmd}"
|
270
271
|
IO.popen(cmd) do |stdout|
|
271
272
|
stdout.each do |line|
|
272
273
|
log line
|
@@ -274,6 +275,11 @@ module Svn2Git
|
|
274
275
|
end
|
275
276
|
end
|
276
277
|
|
278
|
+
unless $?.exitstatus == 0
|
279
|
+
$stderr.puts "command failed:\n#{cmd}"
|
280
|
+
exit -1
|
281
|
+
end
|
282
|
+
|
277
283
|
ret
|
278
284
|
end
|
279
285
|
|
data/svn2git.gemspec
CHANGED
@@ -4,14 +4,13 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "2.1.
|
7
|
+
s.name = "svn2git"
|
8
|
+
s.version = "2.1.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 =
|
13
|
-
s.
|
14
|
-
s.email = %q{nirvdrum@gmail.com}
|
12
|
+
s.date = "2011-12-28"
|
13
|
+
s.email = "nirvdrum@gmail.com"
|
15
14
|
s.executables = ["svn2git"]
|
16
15
|
s.extra_rdoc_files = [
|
17
16
|
"ChangeLog.markdown",
|
@@ -29,10 +28,10 @@ Gem::Specification.new do |s|
|
|
29
28
|
"lib/svn2git/migration.rb",
|
30
29
|
"svn2git.gemspec"
|
31
30
|
]
|
32
|
-
s.homepage =
|
31
|
+
s.homepage = "https://www.negativetwenty.net/redmine/projects/svn2git"
|
33
32
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version =
|
35
|
-
s.summary =
|
33
|
+
s.rubygems_version = "1.8.13"
|
34
|
+
s.summary = "A tool for migrating svn projects to git"
|
36
35
|
|
37
36
|
if s.respond_to? :specification_version then
|
38
37
|
s.specification_version = 3
|
metadata
CHANGED
@@ -1,35 +1,26 @@
|
|
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
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 2.1.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- James Coglan
|
14
9
|
- Kevin Menard
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2011-04-03 00:00:00 -04:00
|
20
|
-
default_executable: svn2git
|
13
|
+
date: 2011-12-28 00:00:00.000000000Z
|
21
14
|
dependencies: []
|
22
|
-
|
23
15
|
description:
|
24
16
|
email: nirvdrum@gmail.com
|
25
|
-
executables:
|
17
|
+
executables:
|
26
18
|
- svn2git
|
27
19
|
extensions: []
|
28
|
-
|
29
|
-
extra_rdoc_files:
|
20
|
+
extra_rdoc_files:
|
30
21
|
- ChangeLog.markdown
|
31
22
|
- README.markdown
|
32
|
-
files:
|
23
|
+
files:
|
33
24
|
- ChangeLog.markdown
|
34
25
|
- MIT-LICENSE
|
35
26
|
- README.markdown
|
@@ -40,39 +31,28 @@ files:
|
|
40
31
|
- lib/svn2git/blah.rb
|
41
32
|
- lib/svn2git/migration.rb
|
42
33
|
- svn2git.gemspec
|
43
|
-
has_rdoc: true
|
44
34
|
homepage: https://www.negativetwenty.net/redmine/projects/svn2git
|
45
35
|
licenses: []
|
46
|
-
|
47
36
|
post_install_message:
|
48
37
|
rdoc_options: []
|
49
|
-
|
50
|
-
require_paths:
|
38
|
+
require_paths:
|
51
39
|
- lib
|
52
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
41
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
|
59
|
-
- 0
|
60
|
-
version: "0"
|
61
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
47
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
67
|
-
segments:
|
68
|
-
- 0
|
69
|
-
version: "0"
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
70
52
|
requirements: []
|
71
|
-
|
72
53
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
54
|
+
rubygems_version: 1.8.13
|
74
55
|
signing_key:
|
75
56
|
specification_version: 3
|
76
57
|
summary: A tool for migrating svn projects to git
|
77
58
|
test_files: []
|
78
|
-
|