-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spyder is unable to detect git if installed with msysgit (Microsoft Windows PC's) #1333
Comments
From bwanama...@gmail.com on 2013-03-26T01:44:44Z It also makes sense to add: if git_bin_path.lower() not in windows_path.lower().split(os.pathsep): before changing the path, so that people who have add msysgit to their windows path, don't need to add it again! e.g. @@ -59,10 +62,28 @@
|
From bwanama...@gmail.com on 2013-03-26T01:47:19Z note also if you have added ssh-agent to your .bashrc, then you will have to view the attached windows console to enter your passphrase when prompted. This is under view menu. |
From bwanama...@gmail.com on 2013-04-02T10:48:32Z I've attached an updated patch (_r2) which adds the check for msysgit in path, before adding it, so that it isn't added if it is already in the path. I've tested it on windows 7 x64 and it works, I will try to make sure it also works on ubuntu-12.10 later, but I don't see why it wouldn't as it only adds the commands for windows, and adds the path if it is a windows machine. also would need testing on windows x86 machine. here is the text: --- scm.orig Sat Jan 5 06:31:28 2013 """SCM utilities""" +import os Local imports@@ -22,8 +23,10 @@
@@ -59,10 +62,29 @@
Attachment: spyderlib_utils_scm_r2.patch |
From ccordoba12 on 2013-04-11T11:25:27Z Thanks a lot for the patch! I'll review and merge it after 2.2 is released. Thanks for your patience. Labels: OpSys-Windows Cat-ProjectExplorer MS-v2.2 |
From jed.lud...@gmail.com on 2013-04-29T15:08:37Z Labels: MS-v2.2.1 |
From jed.lud...@gmail.com on 2013-04-29T15:10:06Z Labels: -MS-v2.2 |
From bwanama...@gmail.com on 2013-05-28T20:54:03Z I hope this (or another approach to integrate git scm) happens at some indeterminate point in the near future. Thanks! Here the latest patch. I tried to stay true to the approach used in the original scm.py file. There are 3 edit's plus the import of os. The only catch is if the user has added the classic cygwin ssh-agent/ssh-add-key script to their .bashrc and their ssh key has a passphrase, in which case they should use the option to view the terminal window from the spyderlib menu bar, and enter their ssh passphrase for the first use. Hope that helps the review process along! Attachment: spyderlib.utils.scm.py.patch |
From jed.lud...@gmail.com on 2013-06-01T13:56:49Z I've been reviewing this patch, and I have a couple of questions. First, is the primary need for this patch because git isn't on the Windows path? If so, is there a particular reason why simply adding it to your path isn't an option? Second, I'm not sure it's safe to assume that all x64 systems will have msysgit installed in 'Program Files'. In my case, I actually have 32-bit msysgit installed on my x64 Windows 7. So there may need to be some different magic there to find git. |
From jed.lud...@gmail.com on 2013-06-01T22:08:02Z After looking further, it seems the msysgit installer typically adds c:\Program Files\Git\cmd to the Windows path rather then c:\Program Files\Git\bin when you ask for it to add itself to the path at install time. That folder contains Windows executables for git.exe and gitk.exe. If we pointed to these commands instead of sh.exe in \bin there would be no need to handle the windows error. Not sure how the ssh key business would behave. Were you specifically trying to run the git commands through sh.exe as opposed to the Windows flavors of git.exe and gitk.exe? And I'm still a little confused about the original issue report. Should the "expected" and "instead" descriptions actually be swapped with each other? Just trying to make sure I really understand the problem we are trying to solve. |
From bwanama...@gmail.com on 2013-06-01T22:27:30Z Responses inline (Microsoft Windows PC's) Windows path? If so, is there a particular reason why simply adding it to Yes and no. One of the two binaries ( msysgit installed in 'Program Files'. In my case, I actually have 32-bit msysgit is an x86 application, not x64, so the default install folder on |
From bwanama...@gmail.com on 2013-06-01T22:36:30Z (Microsoft Windows PC's) c:\Program Files\Git\cmd to the Windows path rather then c:\Program Didn't know about git/cmd folder. So there's a win32 version of gitk, I'll the "expected" and "instead" descriptions actually be swapped with each Oops. My bad. I reversed expected and instead. IE: "expected" should have |
From jed.lud...@gmail.com on 2013-06-01T23:02:05Z Yes, I remember the scary red text at install time. It looks as though adding this \cmd directory might be a less invasive option since only git.exe and gitk.exe get added to the path instead of everything below \bin. Please do check to see if the \cmd path is available on your install. This seems like a better place to be pointing Spyder since it contains native executables for the commands in question. |
From bwanama...@gmail.com on 2013-06-01T23:10:03Z (Microsoft Windows PC's) adding this \cmd directory might be a less invasive option since only Cool, so we can leave the original spyder git comnands alone, (IE do Not calling sh.exe would skip the cygwin ssh-agent script b/c it's in Then the only question left is do we assume git/cmd is always in either |
From bwanama...@gmail.com on 2013-06-02T09:45:58Z I will check if my msysgit install has git/cmd and if so I'll add it to my |
From bwanama...@gmail.com on 2013-06-03T10:29:36Z Jed, --Mark |
From ccordoba12 on 2013-06-10T09:18:37Z Jed, do you agree with Mark's suggestion? The thing is changing env vars on Windows it's no so easy. Perhaps we should report an issue with msysgit guys so they add that dir to PATH with their installer? |
From jed.lud...@gmail.com on 2013-06-10T18:19:25Z Yes, I agree that solving this problem without adding code is the right approach. I haven't had an opportunity to add some documentation yet. The msysgit installer already has a provision for modifying the Windows path, but the user has to make a decision about it. See attached. The second option does the trick. |
From jed.lud...@gmail.com on 2013-06-10T18:21:00Z Sorry. Attachment didn't take the last time. Attachment: git_install_dialog.PNG |
From ccordoba12 on 2013-06-28T05:51:49Z Jed, could you please take a look at this one? I think a very simple wiki page explaining how to install msysgit so that Spyder can detect it would be enough. |
From jed.lud...@gmail.com on 2013-07-03T09:11:19Z This issue was updated by revision 6c2a7a424f60 . Added version control integration subsection to Project Explorer section of the Status: Fixed |
From ccordoba12 on 2013-07-06T21:50:21Z Summary: Spyder is unable to detect git if installed with msysgit (Microsoft Windows PC's) (was: patch for msysgit (Microsoft Windows PC's)) |
From bwanama...@gmail.com on 2013-03-26T02:47:01Z
Please note that reporting bugs from Spyder's help menu ("?" > "Report
issue...") will fill version details for Spyder, Python and Qt in this description for you.
What steps will reproduce the problem?
instead: git-gui or gitk opens What version of the product are you using? On what operating system? spyder-2.1.13.1
windows 7 x64, windows xp x64
python-2.7.3 (amd64)
msysgit-1.8.1.2
Please provide any additional information below
. Here is a patch that can be used on any system.
I also posted about this here: https://groups.google.com/forum/?fromgroups=#!topic/spyderlib/5X6uVWiKTow spyderlib_utils_scm.patch (also attached)
--- /c/Python27/lib/site-packages/spyderlib/utils/scm.orig Sat Jan 5 06:31:28 2013
+++ /c/Python27/lib/site-packages/spyderlib/utils/scm.py Tue Mar 26 00:10:05 2013
@@ -6,6 +6,7 @@
"""SCM utilities"""
+import os
import os.path as osp
Local imports
@@ -22,8 +23,10 @@
('hgtk', ['log']) )
),
'.git': dict(name="git",
@@ -59,10 +62,28 @@
Supported SCM tools: 'commit', 'browse'
Return False if the SCM tool is not installed"""
infos = get_scm_infos(get_scm_root(path))
if git and windows, then check for msysgit and add to path
if programs.find_program(name):
raise RuntimeError(_("Please install the %s tool named '%s'")
% (infos['name'], name))
Attachment: spyderlib_utils_scm.patch
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1333
The text was updated successfully, but these errors were encountered: