svn2git 2.1.2 → 2.2.0

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 CHANGED
@@ -1,3 +1,12 @@
1
+ # 2.2.0 - 2012-01-25
2
+
3
+ Thanks to Craig Hobbs (craigahobbs) and Simon Chiang (thinkerbot) for the patches making up this release.
4
+ It rounds out our tag support by handling tags with special characters and preserving original tag author info.
5
+
6
+ * Fixed an issue with not quoting tag names (thanks craigahobbs and thinkerbot)
7
+ * Fixed an issue whereby the person running the svn2git conversion became the author of every tag (i.e., we lost the
8
+ original tag committer info) (thanks thinkerbot)
9
+
1
10
  # 2.1.2 - 2011-12-28
2
11
 
3
12
  * Fixed a regression in improperly quoting branch names (thanks ziangsong)
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
- :minor: 1
4
- :patch: 2
5
- :build: !!null
3
+ :minor: 2
4
+ :patch: 0
5
+ :build:
@@ -210,16 +210,32 @@ module Svn2Git
210
210
  end
211
211
 
212
212
  def fix_tags
213
+ current = {}
214
+ current['user.name'] = run_command("git config --local --get user.name")
215
+ current['user.email'] = run_command("git config --local --get user.email")
216
+
213
217
  @tags.each do |tag|
214
218
  tag = tag.strip
215
- id = tag.gsub(%r{^svn\/tags\/}, '').strip
216
- subject = run_command("git log -1 --pretty=format:'%s' #{tag}")
217
- date = run_command("git log -1 --pretty=format:'%ci' #{tag}")
218
- subject = escape_quotes(subject)
219
- date = escape_quotes(date)
220
- id = escape_quotes(id)
221
- run_command("GIT_COMMITTER_DATE='#{date}' git tag -a -m '#{subject}' '#{id}' '#{escape_quotes(tag)}'")
222
- run_command("git branch -d -r #{tag}")
219
+ id = tag.gsub(%r{^svn\/tags\/}, '').strip
220
+ subject = run_command("git log -1 --pretty=format:'%s' '#{escape_quotes(tag)}'")
221
+ date = run_command("git log -1 --pretty=format:'%ci' '#{escape_quotes(tag)}'")
222
+ author = run_command("git log -1 --pretty=format:'%an' '#{escape_quotes(tag)}'")
223
+ email = run_command("git log -1 --pretty=format:'%ae' '#{escape_quotes(tag)}'")
224
+ run_command("git config --local user.name '#{escape_quotes(author)}'")
225
+ run_command("git config --local user.email '#{escape_quotes(email)}'")
226
+ run_command("GIT_COMMITTER_DATE='#{escape_quotes(date)}' git tag -a -m '#{escape_quotes(subject)}' '#{escape_quotes(id)}' '#{escape_quotes(tag)}'")
227
+ run_command("git branch -d -r '#{escape_quotes(tag)}'")
228
+ end
229
+
230
+ ensure
231
+ current.each_pair do |name, value|
232
+ # If a line was read, then there was a config value so restore it.
233
+ # Otherwise unset the value because originally there was none.
234
+ if value[-1] == "\n"
235
+ run_command("git config --local #{name} '#{value.chomp("\n")}'")
236
+ else
237
+ run_command("git config --local --unset #{name}")
238
+ end
223
239
  end
224
240
  end
225
241
 
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.1.2"
8
+ s.version = "2.2.0"
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 = "2011-12-28"
12
+ s.date = "2012-01-25"
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.13"
33
+ s.rubygems_version = "1.8.15"
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.1.2
4
+ version: 2.2.0
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: 2011-12-28 00:00:00.000000000Z
13
+ date: 2012-01-25 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.13
54
+ rubygems_version: 1.8.15
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: A tool for migrating svn projects to git