svn2git 2.2.1 → 2.2.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 +14 -1
- data/README.markdown +9 -5
- data/VERSION.yml +1 -1
- data/lib/svn2git/migration.rb +19 -11
- data/svn2git.gemspec +3 -3
- metadata +3 -3
data/ChangeLog.markdown
CHANGED
@@ -1,4 +1,17 @@
|
|
1
|
-
# 2.2.
|
1
|
+
# 2.2.2
|
2
|
+
|
3
|
+
This is an overdue bugfix release. No new features were added, but several long-standing bugs fixed by the community
|
4
|
+
have been merged. Many thanks to Edson de Lima (edsonlima), Rudger (Rud5G), Ben Wolfe (bwolfe), CyberTech, PowerKiKi, and Philipp Riemer (ruderphilipp) for the pull requests.
|
5
|
+
|
6
|
+
* Fixed an issue working with repositories that contained a space in the name (thanks edsonlima).
|
7
|
+
* Fixed an issue working with tags that contain a hyphen (thanks Rud5G).
|
8
|
+
* Fixed an issue with fixing tags during a rebase (thanks PowerKiKi).
|
9
|
+
* Double-quote git-svn commands working with tags to avoid issues with special strings (thanks CyberTech).
|
10
|
+
* Improved the documentation example of fetching the author list for an SVN repository (thanks bwolfe).
|
11
|
+
* Set the git committer date for tags in a more cross-platform manner (thanks CyberTech).
|
12
|
+
* Improved documentation formatting (thanks ruderphilipp).
|
13
|
+
|
14
|
+
# 2.2.1 - 2012-02-25
|
2
15
|
|
3
16
|
This is a critical bugfix release if your repository has tags. Thanks to David Zülke (dzuelke) for the patches making up this release.
|
4
17
|
|
data/README.markdown
CHANGED
@@ -156,11 +156,11 @@ system with the list of conversions to make, one per line, for example:
|
|
156
156
|
jcoglan = James Coglan <jcoglan@never-you-mind.com>
|
157
157
|
stnick = Santa Claus <nicholas@lapland.com>
|
158
158
|
|
159
|
-
Then pass an
|
159
|
+
Then pass an _authors_ option to svn2git pointing to your file:
|
160
160
|
|
161
161
|
$ svn2git http://svn.example.com/path/to/repo --authors ~/authors.txt
|
162
162
|
|
163
|
-
Alternatively, you can place the authors file into
|
163
|
+
Alternatively, you can place the authors file into `~/.svn2git/authors` and
|
164
164
|
svn2git will load it out of there. This allows you to build up one authors
|
165
165
|
file for all your projects and have it loaded for each repository that you
|
166
166
|
migrate.
|
@@ -171,10 +171,14 @@ the logs from the svn repository, pulls out all the names from the commits,
|
|
171
171
|
sorts them, and then reduces the list to only unique names. So, in the end
|
172
172
|
it outputs a list of usernames of the people that made commits to the svn
|
173
173
|
repository which name on its own line. This would allow you to easily
|
174
|
-
redirect the output of this command sequence to
|
174
|
+
redirect the output of this command sequence to `~/.svn2git/authors` and have
|
175
175
|
a very good starting point for your mapping.
|
176
176
|
|
177
|
-
$ svn log | grep -E "r[0-9]+ \| .+ \|" | awk '{print $3}' | sort | uniq
|
177
|
+
$ svn log --quiet | grep -E "r[0-9]+ \| .+ \|" | awk '{print $3}' | sort | uniq
|
178
|
+
|
179
|
+
Or, for a remote URL:
|
180
|
+
|
181
|
+
$ svn log --quiet http://path/to/root/of/project | grep -E "r[0-9]+ \| .+ \|" | awk '{print $3}' | sort | uniq
|
178
182
|
|
179
183
|
Debugging
|
180
184
|
---------
|
@@ -183,7 +187,7 @@ If you're having problems with converting your repository and you're not sure wh
|
|
183
187
|
try turning on verbose logging. This will print out more information from the
|
184
188
|
underlying git-svn process.
|
185
189
|
|
186
|
-
You can turn on verbose logging with the
|
190
|
+
You can turn on verbose logging with the `-v` or `--verbose` flags, like so:
|
187
191
|
|
188
192
|
$ svn2git http://svn.yoursite.com/path/to/repo --verbose
|
189
193
|
|
data/VERSION.yml
CHANGED
data/lib/svn2git/migration.rb
CHANGED
@@ -16,7 +16,7 @@ module Svn2Git
|
|
16
16
|
else
|
17
17
|
show_help_message('Missing SVN_URL parameter') if args.empty?
|
18
18
|
show_help_message('Too many arguments') if args.size > 1
|
19
|
-
@url = args.first
|
19
|
+
@url = args.first.gsub(' ', "\\ ")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -26,8 +26,8 @@ module Svn2Git
|
|
26
26
|
else
|
27
27
|
clone!
|
28
28
|
end
|
29
|
-
fix_tags
|
30
29
|
fix_branches
|
30
|
+
fix_tags
|
31
31
|
fix_trunk
|
32
32
|
optimize_repos
|
33
33
|
end
|
@@ -221,14 +221,22 @@ module Svn2Git
|
|
221
221
|
@tags.each do |tag|
|
222
222
|
tag = tag.strip
|
223
223
|
id = tag.gsub(%r{^svn\/tags\/}, '').strip
|
224
|
-
subject = run_command("git log -1 --pretty=format:'%s'
|
225
|
-
date = run_command("git log -1 --pretty=format:'%ci'
|
226
|
-
author = run_command("git log -1 --pretty=format:'%an'
|
227
|
-
email = run_command("git log -1 --pretty=format:'%ae'
|
228
|
-
run_command("git config --local user.name
|
229
|
-
run_command("git config --local user.email
|
230
|
-
|
231
|
-
|
224
|
+
subject = run_command("git log -1 --pretty=format:'%s' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
|
225
|
+
date = run_command("git log -1 --pretty=format:'%ci' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
|
226
|
+
author = run_command("git log -1 --pretty=format:'%an' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
|
227
|
+
email = run_command("git log -1 --pretty=format:'%ae' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
|
228
|
+
run_command("git config --local user.name \"#{escape_quotes(author)}\"")
|
229
|
+
run_command("git config --local user.email \"#{escape_quotes(email)}\"")
|
230
|
+
|
231
|
+
begin
|
232
|
+
original_git_committer_date = ENV['GIT_COMMITTER_DATE']
|
233
|
+
ENV['GIT_COMMITTER_DATE'] = escape_quotes(date)
|
234
|
+
run_command("git tag -a -m \"#{escape_quotes(subject)}\" \"#{escape_quotes(id)}\" \"#{escape_quotes(tag)}\"")
|
235
|
+
ensure
|
236
|
+
ENV['GIT_COMMITTER_DATE'] = original_git_committer_date
|
237
|
+
end
|
238
|
+
|
239
|
+
run_command("git branch -d -r \"#{escape_quotes(tag)}\"")
|
232
240
|
end
|
233
241
|
|
234
242
|
ensure
|
@@ -238,7 +246,7 @@ module Svn2Git
|
|
238
246
|
# If a line was read, then there was a config value so restore it.
|
239
247
|
# Otherwise unset the value because originally there was none.
|
240
248
|
if value.strip != ''
|
241
|
-
run_command("git config --local #{name}
|
249
|
+
run_command("git config --local #{name} \"#{value.strip}\"")
|
242
250
|
else
|
243
251
|
run_command("git config --local --unset #{name}")
|
244
252
|
end
|
data/svn2git.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "svn2git"
|
8
|
-
s.version = "2.2.
|
8
|
+
s.version = "2.2.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 = "2012-
|
12
|
+
s.date = "2012-10-07"
|
13
13
|
s.email = "nirvdrum@gmail.com"
|
14
14
|
s.executables = ["svn2git"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
]
|
31
31
|
s.homepage = "https://www.negativetwenty.net/redmine/projects/svn2git"
|
32
32
|
s.require_paths = ["lib"]
|
33
|
-
s.rubygems_version = "1.8.
|
33
|
+
s.rubygems_version = "1.8.23"
|
34
34
|
s.summary = "A tool for migrating svn projects to git"
|
35
35
|
|
36
36
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svn2git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-07 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description:
|
16
16
|
email: nirvdrum@gmail.com
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
53
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.8.
|
54
|
+
rubygems_version: 1.8.23
|
55
55
|
signing_key:
|
56
56
|
specification_version: 3
|
57
57
|
summary: A tool for migrating svn projects to git
|