wbond / sublime_tortoise

Keyboard shortcuts and menu entries to execute TortoiseSVN, TortoiseHg and TortoiseGit commands
http://wbond.net/sublime_packages/tortoise
27 stars 21 forks source link

tgit.exe not found on windows 7 64bit #10

Open jumperchen opened 12 years ago

jumperchen commented 12 years ago

If right-click on the git file, it will show "[Error 2] The system cannot find the file specified" error. The issue is that the executor file path is wrong from the following code.

 self.git_path = os.path.dirname(tortoise_proc_path) + '\\tgit.exe'
ryanhanwu commented 12 years ago

Reference : http://code.google.com/p/tortoisegit/ (coz in 64bit windows need msysgit )

wbond commented 12 years ago

This used to work - does anyone know if TortoiseGit changed their binary name?

jumperchen commented 12 years ago

git.exe is its current name, but I think the path should be able to customize if the name is changed. For msysgit, it provides two installation files and both installing path are different, so using users-setting is better. :)

wbond commented 12 years ago

I'm not currently using either Windows, and thus by extendsion, Tortoise. I'll probably be able to get to this eventually, but if someone wants to take a swing at fixing the issue and making sure it works, I can double check it and release a new version.

jumperchen commented 12 years ago

I fixed that issue locally by changing the following code in tortoise.py file.

 self.git_path = os.path.dirname(tortoise_proc_path) + '\\tgit.exe'

->

self.git_path = "c:\xxxx\git.exe"

And this can fix the issue, so you can fix the issue anytime when you available. :)

asfaltboy commented 12 years ago

Can also happen on 32-bit windows without tgit.exe in path (for some reason). I'll submit a pull request for this in a bit

AdamHarte commented 12 years ago

I am on Win7 64bit, and get this issue. Whenever I right click in either the Folders sidebar or in the actual editor when the project is using GIT, i get the message "[Error 2] The system cannot find the file specified", and the right-click menu does not show. This does not happen with SVN projects, or projects with to source control.

In the settings I set the git_tortoiseproc_path to my GIT TortoiseProc.exe path, but same thing happens.

This error shows even if I set enable_menus to false in this plugins settings.

asfaltboy commented 12 years ago

please see my fork at https://github.com/asfaltboy/sublime_tortoise, it solves the problem by letting you config the location of git.exe/tgit.exe when it's not on system path... anyway I hope wbond accepts the pull request

wbond commented 12 years ago

So it appears TortoiseGit no longer includes tgit.exe. @asfaltboy Your patch is a start, but it would be good for it to be a bit smarter about trying to find Git in some default locations instead of every user having to set an option before the package works.

AdamHarte commented 12 years ago

"be a bit smarter about trying to find Git in some default locations" sounds like a good plan. But could have an option as a fallback.

borekb commented 12 years ago

So what is the current work-around so that I can use the Tortoise package?

asfaltboy commented 12 years ago
  1. download my fork https://github.com/asfaltboy/sublime_tortoise,
  2. get "git.exe" or "tgit.exe" (you can usually get it by installing the git package available here http://git-scm.com/ ),
  3. uncomment and set the new option in Tortoise.sublime-settings ("git_tgit_path").
  4. profit
asfaltboy commented 11 years ago

@wbond seeking in default locations is a good start, but unfortunately, such a solution is bound to fail the moment tgit maintainers decide to change the default windows installation path...

What we could do instead is provide a "browse dialog" to ask the user to locate the file themselves. Unfortunately, ST2 does not allow this feature at this time (at least by this api documentation)

Anyone has another suggestion (besides doing a full fledged search for the current tgit.exe filename?)