3790: RB not able to open local git repo on Windows

der.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
March 4, 2015
What version are you running?
2.0.13

What's the URL of the page containing the problem?
http://blub/reviewboard/admin/db/scmtools/repository/70/

What steps will reproduce the problem?
1. Set a repo name
2. Set repo type Git
3. Set path: file://D:/git_clones/some_repo/.git
4. Click save

What is the expected output? What do you see instead?
RB Repo is created

instead
Error message
Permission denied accessing the local Git repository '/git_clones/some_repo/.git'

What operating system are you using? What browser?
Windows

Please provide any additional information below.
As you can see the hard drive letter is missing from the path

There is already a stackoverflow entry offering a fix
http://stackoverflow.com/questions/6107439/setting-up-a-git-repository-under-review-board-on-windows-server-2003

I'm not sure if this fix is platform independent.
Therefore, I'm proposing platform dependent solution in line 485:

if platform.system() == "Windows":
    #Windows requires drive letter (e.g. C:/)
    self.git_dir = url_parts[1] + url_parts[2]
else:
    self.git_dir = url_parts[2]
david
#1 david
Fixed in release-2.0.x (9e2da0c). Thanks!
  • +Fixed