svn2git 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6288171a5042a47ab1f9355f5beeb9671436c5b5
4
+ data.tar.gz: 94c00b0071c912bc66e4cc5a10f7d99fe9973710
5
+ SHA512:
6
+ metadata.gz: cc234ce7131b7c60952c29c4f63e37c933e1ba6719ad699c946aa5f7d9f5b10cc18322b155689f12db76809bfbd2b8672b7da8762efe5a80b8f2f9e9d9f1a98c
7
+ data.tar.gz: 9a653aac4a7fbfb31751413244675f4f57ebd8258dd925b9c4f9302995a45f85fcfbebbdc4e33be41dde79ca1b01820c61bbd465143887899fcb7ef94a0ce06b
@@ -1,3 +1,13 @@
1
+ # 2.4.0 - 2016-10-30
2
+
3
+ This release introduces the ability to supply a password for SVN repositories that can't authenticate by other means.
4
+ It also adds the ability to specify the '--branches' and '--tags' arguments multiple times to better support those with
5
+ more complicated SVN repository layouts.
6
+
7
+ * Added support for the '--password' option for authentication (thanks edpbx).
8
+ * Added the ability to specify the '--branches' and '--tags' arguments multiple times (thanks pdf).
9
+ * Fixed a problem with processing of the '--exclude' argument (improper quoting internally) (thanks pdf).
10
+
1
11
  # 2.3.2 - 2014-06-08
2
12
 
3
13
  This is a bugfix release. It fixes issues running with Windows using MRI ruby and fixes a problem with Ruby 1.8.7.
@@ -66,7 +66,7 @@ Installation
66
66
 
67
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 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 prerequisites would look like:
68
68
 
69
- $ sudo apt-get install git-core git-svn ruby rubygems
69
+ $ sudo apt-get install git-core git-svn ruby
70
70
 
71
71
  Once you have the necessary software on your system, you can install svn2git through rubygems, which will add the `svn2git` command to your PATH.
72
72
 
@@ -118,6 +118,10 @@ one of them.
118
118
 
119
119
  $ svn2git http://svn.example.com/path/to/repo --username <<user_with_perms>>
120
120
 
121
+ If this doesn't cooperate and you need to specify a password on the command-line:
122
+
123
+ $ svn2git http://svn.example.com/path/to/repo --username <<user_with_perms>> --password <<password>>
124
+
121
125
  8. You need to migrate starting at a specific svn revision number.
122
126
 
123
127
  $ svn2git http://svn.example.com/path/to/repo --revision <<starting_revision_number>>
@@ -176,11 +180,11 @@ repository which name on its own line. This would allow you to easily
176
180
  redirect the output of this command sequence to `~/.svn2git/authors` and have
177
181
  a very good starting point for your mapping.
178
182
 
179
- $ svn log --quiet | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/^ //' | sort | uniq
183
+ $ svn log --quiet | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq
180
184
 
181
185
  Or, for a remote URL:
182
186
 
183
- $ svn log --quiet http://path/to/root/of/project | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/^ //' | sort | uniq
187
+ $ svn log --quiet http://path/to/root/of/project | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq
184
188
 
185
189
  Debugging
186
190
  ---------
@@ -202,9 +206,10 @@ Options Reference
202
206
  Specific options:
203
207
  --rebase Instead of cloning a new project, rebase an existing one against SVN
204
208
  --username NAME Username for transports that needs it (http(s), svn)
209
+ --password PASS Password for transports that needs it (http(s), svn)
205
210
  --trunk TRUNK_PATH Subpath to trunk from repository URL (default: trunk)
206
- --branches BRANCHES_PATH Subpath to branches from repository URL (default: branches)
207
- --tags TAGS_PATH Subpath to tags from repository URL (default: tags)
211
+ --branches BRANCHES_PATH Subpath to branches from repository URL (default: branches); can be used multiple times
212
+ --tags TAGS_PATH Subpath to tags from repository URL (default: tags); can be used multiple times
208
213
  --rootistrunk Use this if the root level of the repo is equivalent to the trunk and there are no tags or branches
209
214
  --notrunk Do not import anything from trunk
210
215
  --nobranches Do not try to import any branches
@@ -1,5 +1,5 @@
1
- ---
2
- :build:
3
- :minor: 3
4
- :patch: 2
1
+ ---
5
2
  :major: 2
3
+ :minor: 4
4
+ :patch: 0
5
+ :build:
@@ -47,11 +47,12 @@ module Svn2Git
47
47
  options[:nominimizeurl] = false
48
48
  options[:rootistrunk] = false
49
49
  options[:trunk] = 'trunk'
50
- options[:branches] = 'branches'
51
- options[:tags] = 'tags'
50
+ options[:branches] = []
51
+ options[:tags] = []
52
52
  options[:exclude] = []
53
53
  options[:revision] = nil
54
54
  options[:username] = nil
55
+ options[:password] = nil
55
56
  options[:rebasebranch] = false
56
57
 
57
58
  if File.exists?(File.expand_path(DEFAULT_AUTHORS_FILE))
@@ -74,16 +75,20 @@ module Svn2Git
74
75
  options[:username] = username
75
76
  end
76
77
 
78
+ opts.on('--password PASSWORD', 'Password for transports that need it (http(s), svn)') do |password|
79
+ options[:password] = password
80
+ end
81
+
77
82
  opts.on('--trunk TRUNK_PATH', 'Subpath to trunk from repository URL (default: trunk)') do |trunk|
78
83
  options[:trunk] = trunk
79
84
  end
80
85
 
81
- opts.on('--branches BRANCHES_PATH', 'Subpath to branches from repository URL (default: branches)') do |branches|
82
- options[:branches] = branches
86
+ opts.on('--branches BRANCHES_PATH', 'Subpath to branches from repository URL (default: branches); can be used multiple times') do |branches|
87
+ options[:branches] << branches
83
88
  end
84
89
 
85
- opts.on('--tags TAGS_PATH', 'Subpath to tags from repository URL (default: tags)') do |tags|
86
- options[:tags] = tags
90
+ opts.on('--tags TAGS_PATH', 'Subpath to tags from repository URL (default: tags); can be used multiple times') do |tags|
91
+ options[:tags] << tags
87
92
  end
88
93
 
89
94
  opts.on('--rootistrunk', 'Use this if the root level of the repo is equivalent to the trunk and there are no tags or branches') do
@@ -172,30 +177,47 @@ module Svn2Git
172
177
  exclude = @options[:exclude]
173
178
  revision = @options[:revision]
174
179
  username = @options[:username]
180
+ password = @options[:password]
175
181
 
176
182
  if rootistrunk
177
183
  # Non-standard repository layout. The repository root is effectively 'trunk.'
178
184
  cmd = "git svn init --prefix=svn/ "
179
- cmd += "--username=#{username} " unless username.nil?
185
+ cmd += "--username='#{username}' " unless username.nil?
186
+ cmd += "--password='#{password}' " unless password.nil?
180
187
  cmd += "--no-metadata " unless metadata
181
188
  if nominimizeurl
182
189
  cmd += "--no-minimize-url "
183
190
  end
184
- cmd += "--trunk=#{@url}"
191
+ cmd += "--trunk='#{@url}'"
185
192
  run_command(cmd, true, true)
186
193
 
187
194
  else
188
195
  cmd = "git svn init --prefix=svn/ "
189
196
 
190
197
  # Add each component to the command that was passed as an argument.
191
- cmd += "--username=#{username} " unless username.nil?
198
+ cmd += "--username='#{username}' " unless username.nil?
199
+ cmd += "--password='#{password}' " unless password.nil?
192
200
  cmd += "--no-metadata " unless metadata
193
201
  if nominimizeurl
194
202
  cmd += "--no-minimize-url "
195
203
  end
196
- cmd += "--trunk=#{trunk} " unless trunk.nil?
197
- cmd += "--tags=#{tags} " unless tags.nil?
198
- cmd += "--branches=#{branches} " unless branches.nil?
204
+ cmd += "--trunk='#{trunk}' " unless trunk.nil?
205
+ unless tags.nil?
206
+ # Fill default tags here so that they can be filtered later
207
+ tags = ['tags'] if tags.empty?
208
+ # Process default or user-supplied tags
209
+ tags.each do |tag|
210
+ cmd += "--tags='#{tag}' "
211
+ end
212
+ end
213
+ unless branches.nil?
214
+ # Fill default branches here so that they can be filtered later
215
+ branches = ['branches'] if branches.empty?
216
+ # Process default or user-supplied branches
217
+ branches.each do |branch|
218
+ cmd += "--branches='#{branch}' "
219
+ end
220
+ end
199
221
 
200
222
  cmd += @url
201
223
 
@@ -216,11 +238,11 @@ module Svn2Git
216
238
  regex = []
217
239
  unless rootistrunk
218
240
  regex << "#{trunk}[/]" unless trunk.nil?
219
- regex << "#{tags}[/][^/]+[/]" unless tags.nil?
220
- regex << "#{branches}[/][^/]+[/]" unless branches.nil?
241
+ tags.each{|tag| regex << "#{tag}[/][^/]+[/]"} unless tags.nil? or tags.empty?
242
+ branches.each{|branch| regex << "#{branch}[/][^/]+[/]"} unless branches.nil? or branches.empty?
221
243
  end
222
244
  regex = '^(?:' + regex.join('|') + ')(?:' + exclude.join('|') + ')'
223
- cmd += "'--ignore-paths=#{regex}'"
245
+ cmd += "--ignore-paths='#{regex}' "
224
246
  end
225
247
  run_command(cmd, true, true)
226
248
 
@@ -2,16 +2,17 @@
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.4.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = %q{svn2git}
8
- s.version = "2.3.2"
8
+ s.name = "svn2git"
9
+ s.version = "2.4.0"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["James Coglan", "Kevin Menard"]
12
- s.date = %q{2014-06-08}
13
- s.default_executable = %q{svn2git}
14
- s.email = %q{nirvdrum@gmail.com}
14
+ s.date = "2016-10-30"
15
+ s.email = "nirvdrum@gmail.com"
15
16
  s.executables = ["svn2git"]
16
17
  s.extra_rdoc_files = [
17
18
  "ChangeLog.markdown",
@@ -31,14 +32,13 @@ Gem::Specification.new do |s|
31
32
  "test/escape_quotes_test.rb",
32
33
  "test/test_helper.rb"
33
34
  ]
34
- s.homepage = %q{https://github.com/nirvdrum/svn2git}
35
+ s.homepage = "https://github.com/nirvdrum/svn2git"
35
36
  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
+ s.rubygems_version = "2.5.1"
38
+ s.summary = "A tool for migrating svn projects to git"
39
39
 
40
40
  if s.respond_to? :specification_version then
41
- s.specification_version = 3
41
+ s.specification_version = 4
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"])
metadata CHANGED
@@ -1,48 +1,39 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: svn2git
3
- version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease:
6
- segments:
7
- - 2
8
- - 3
9
- - 2
10
- version: 2.3.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.4.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - James Coglan
14
8
  - Kevin Menard
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2014-06-08 00:00:00 -04:00
20
- default_executable: svn2git
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
12
+ date: 2016-10-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: minitest
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
28
18
  - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
34
21
  type: :development
35
- version_requirements: *id001
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
36
28
  description:
37
29
  email: nirvdrum@gmail.com
38
- executables:
30
+ executables:
39
31
  - svn2git
40
32
  extensions: []
41
-
42
- extra_rdoc_files:
33
+ extra_rdoc_files:
43
34
  - ChangeLog.markdown
44
35
  - README.markdown
45
- files:
36
+ files:
46
37
  - ChangeLog.markdown
47
38
  - MIT-LICENSE
48
39
  - README.markdown
@@ -55,39 +46,28 @@ files:
55
46
  - test/commands_test.rb
56
47
  - test/escape_quotes_test.rb
57
48
  - test/test_helper.rb
58
- has_rdoc: true
59
49
  homepage: https://github.com/nirvdrum/svn2git
60
- licenses:
50
+ licenses:
61
51
  - MIT
52
+ metadata: {}
62
53
  post_install_message:
63
54
  rdoc_options: []
64
-
65
- require_paths:
55
+ require_paths:
66
56
  - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
70
59
  - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
76
- required_rubygems_version: !ruby/object:Gem::Requirement
77
- none: false
78
- requirements:
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
79
64
  - - ">="
80
- - !ruby/object:Gem::Version
81
- hash: 3
82
- segments:
83
- - 0
84
- version: "0"
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
85
67
  requirements: []
86
-
87
68
  rubyforge_project:
88
- rubygems_version: 1.6.2
69
+ rubygems_version: 2.5.1
89
70
  signing_key:
90
- specification_version: 3
71
+ specification_version: 4
91
72
  summary: A tool for migrating svn projects to git
92
73
  test_files: []
93
-