From dd92cd1d06edbeef9a6c14076fa7304964b0bf90 Mon Sep 17 00:00:00 2001 From: Killian Stone Date: Thu, 18 Jul 2013 15:06:36 -0500 Subject: [PATCH 1/2] Added --localtime option --- lib/svn2git/migration.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/svn2git/migration.rb b/lib/svn2git/migration.rb index 30c078c..8c83b4c 100644 --- a/lib/svn2git/migration.rb +++ b/lib/svn2git/migration.rb @@ -45,6 +45,7 @@ def parse(args) options[:exclude] = [] options[:revision] = nil options[:username] = nil + options[:localtime] = nil if File.exists?(File.expand_path(DEFAULT_AUTHORS_FILE)) options[:authors] = DEFAULT_AUTHORS_FILE @@ -117,6 +118,10 @@ def parse(args) options[:exclude] << regex end + opts.on('--localtime', 'Use localtime foro git migration') do + options[:localtime] = true + end + opts.on('-v', '--verbose', 'Be verbose in logging -- useful for debugging issues') do options[:verbose] = true end @@ -148,12 +153,14 @@ def clone! exclude = @options[:exclude] revision = @options[:revision] username = @options[:username] + localtime = @options[:localtime] if rootistrunk # Non-standard repository layout. The repository root is effectively 'trunk.' cmd = "git svn init --prefix=svn/ " cmd += "--username=#{username} " unless username.nil? cmd += "--no-metadata " unless metadata + if nominimizeurl cmd += "--no-minimize-url " end @@ -181,6 +188,7 @@ def clone! run_command("git config --local svn.authorsfile #{authors}") unless authors.nil? cmd = "git svn fetch " + cmd += "--localtime" if localtime unless revision.nil? range = revision.split(":") range[1] = "HEAD" unless range[1] From c78a56e120617a069deccbea7f59985ae1ecd204 Mon Sep 17 00:00:00 2001 From: Killian Stone Date: Thu, 18 Jul 2013 15:10:22 -0500 Subject: [PATCH 2/2] fixed a typo --- bin/svn2git | 0 lib/svn2git/migration.rb | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 bin/svn2git diff --git a/bin/svn2git b/bin/svn2git old mode 100644 new mode 100755 diff --git a/lib/svn2git/migration.rb b/lib/svn2git/migration.rb index 8c83b4c..46b0204 100644 --- a/lib/svn2git/migration.rb +++ b/lib/svn2git/migration.rb @@ -118,7 +118,7 @@ def parse(args) options[:exclude] << regex end - opts.on('--localtime', 'Use localtime foro git migration') do + opts.on('--localtime', 'Use localtime for git migration') do options[:localtime] = true end