Skip to content

Commit

Permalink
Fixed issue nirvdrum#18: svn2git fails if branch contains shell speci…
Browse files Browse the repository at this point in the history
…al characters
  • Loading branch information
nirvdrum committed Dec 27, 2011
1 parent 7418919 commit b3f0f10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Fixed SVN branch detection (thanks thinkerbot)
* Stop processing when a git subprocess fails (thanks thinkerbot)
* Fixed an issue with SVN branches containing shell special characters (thanks sleicht)

# 2.1.0 - 2011-04-03

Expand Down
8 changes: 4 additions & 4 deletions lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ def fix_branches
if @options[:rebase] && (@local.include?(branch) || branch == 'trunk')
lbranch = branch
lbranch = 'master' if branch == 'trunk'
run_command("git checkout -f #{lbranch}")
run_command("git rebase remotes/svn/#{branch}")
run_command("git checkout -f \"#{lbranch}\"")
run_command("git rebase \"remotes/svn/#{branch}\"")
next
end

next if branch == 'trunk' || @local.include?(branch)
run_command("git branch --track #{branch} remotes/svn/#{branch}")
run_command("git checkout #{branch}")
run_command("git branch --track \"#{branch}\" \"remotes/svn/#{branch}\"")
run_command("git checkout \"#{branch}"\")
end
end

Expand Down

0 comments on commit b3f0f10

Please sign in to comment.