bradsokol / VcsGutter

A plugin for Sublime Text 2 and 3 to show diffs from Git, Mercurial, or Subversion in the editor's gutter.
MIT License
95 stars 20 forks source link

Don't see the gutter #8

Closed christiaanwesterbeek closed 11 years ago

christiaanwesterbeek commented 11 years ago

I am on Windows 8 and installed the VCS Gutter package through Package Control. I have a folder that I checked out using Netbeans, including the .svn directory. Restarted Sublime. I opened a file within the folder I just checked out. I changed the file. But I dont see the + and - signe in the gutter.

turtoise SVN is installed and svn is on my PATH, so I can do svn in any directory.

I guess I followed every step in the installation procedure, but I missed something obvious. Not sure what to do and googling this, did not give any clues... Any idea?

image

bradsokol commented 11 years ago

Sorry for the late reply. I don't use Windows heavily so it took some time to test. I am seeing the issue. I will dig in to the cause.

christiaanwesterbeek commented 11 years ago

Thanks for taking the time. For me to see changes in the gutter, is why I would move from using Netbeans. I tried WebStorm, but way to heavy and slow. I like Sublime and will start using it as soon as I can have the changes visible in the gutter.

I would be happy to help you. Maybe with testing. I use Windows often.

cristianciofu commented 11 years ago

Any news regarding this issue?

I'm using Mercurial on a Windows XP machine.

Thanks!

cristianciofu commented 11 years ago

I looked at the console and found this

Traceback (most recent call last): File ".\sublimeplugin.py", line 339, in run File ".\vcs_gutter.py", line 26, in run File ".\view_collection.py", line 51, in diff File ".\gutter_handlers.py", line 118, in diff File ".\gutter_handlers.py", line 45, in update_buf_file LookupError: unknown encoding: Windows1252

Does this help?

bbrdaric commented 11 years ago

@bradsokol, any chances you could look at this? It seems like a great plugin, but doesn't work on my Windows 7 x64

I get

Writing file /C/wamp/www/test-app/css/style.css with encoding UTF-8 Traceback (most recent call last): File ".\sublimeplugin.py", line 339, in run return self.run() File ".\vcs_gutter.py", line 26, in run File ".\view_collection.py", line 51, in diff File ".\gutter_handlers.py", line 124, in diff File ".\gutter_handlers.py", line 135, in run_command File ".\subprocess.py", line 633, in init File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 2] The system cannot find the file specified

bradsokol commented 11 years ago

@borissamardzija Do you have a diff utility in your path?

cristianciofu commented 11 years ago

@bradsokol for the Mercurial issue I posted above do you have any ideas?

Thanks :+1:

bradsokol commented 11 years ago

@cristic84 Your issue appears to be different, related to encoding you're using to save the file I suspect. I'll have to take a look at this in more depth after work.

To confirm, do you have diff installed?

bbrdaric commented 11 years ago

@bradsokol Sorry for not mentioning, it is SVN and yes I have diff in path

C:\wamp\www\test-app\css>svn diff style.css
Index: style.css
===================================================================
--- style.css   (revision 19)
+++ style.css   (working copy)
@@ -21,6 +21,7 @@
    color:#333;
    background-color: #E7EAED;
    -webkit-tap-highlight-color: transparent;
+       abcdef
 }

 label{

C:\wamp\www\test-app\css>

From previous log you can see file is saved in default encoding (UTF-8)

bradsokol commented 11 years ago

@borissamardzija 'svn diff' is not the same as 'diff', which VCS Gutter requires. In other words, VCS Gutter relies on a diff.exe program being somewhere in your path.

Could you go to a Windows command line and run this command:

where diff

This should confirm whether or not diff.exe is available to VCS Gutter.

bradsokol commented 11 years ago

@cristic84 I've re-created the problem that you describe. I was able to get the same error re-opening the file with the Windows 1252 encoding (File/Reopen with Encoding/Western (Windows 1252). Subsequent changes to the file do not display markers in the gutter. The error you included does appear in my console.

FWIW, this problem also happens on OS X. I'll have to try Ubuntu as well.

bradsokol commented 11 years ago

There are two problems being discussed under this issue:

To help with clarity, I've opened #10 to track the encoding issue separately. @cristic84 let's pick the discussion up there.

bbrdaric commented 11 years ago

@bradsokol huh, thank you!. It was misunderstanding on my side. The thing is, there is no 'diff' in svn installation so I didn't have it in path. As a workaround, I installed git and added "C:\Program Files (x86)\Git\bin" to my path and your plugin works fine now.

bradsokol commented 11 years ago

I am not a regular user of Windows, but I have seen some Subversion installations that have diff.exe installed in the same bin directory with svn.exe. Other installations do not have diff.exe.

There's also Gnu diff available here: http://gnuwin32.sourceforge.net/packages/diffutils.htm

christiaanwesterbeek commented 11 years ago

Ok. I added "C:\Program Files (x86)\Git\bin" to my path where diff.exe is. Tested that diff really works anywhere. Still no gutter. I presume I have the wrong diff.exe, but I couldn't really figure out which of both I needed, because I had trouble reading which one you mean by: "'svn diff' is not the same as 'diff', which VCS Gutter requires."

Then I installed gnu's diff. I did. Removed "C:\Program Files (x86)\Git\bin" from path. Added "C:\Program Files (x86)\GnuWin32\bin" to my path. Even rebooted. Tested diff is on my path. Still no gutter.

So my problem sits somewhere on the encoding issue I guess.

BTW, I tried saving my changed file in UTF-8, ANSI and Unicode. Never a gutter.

bbrdaric commented 11 years ago

@devotis try to open Sublime console (Ctrl+` or select View | Show Console in the menu.) and check if there are any errors.

As for diff version, I have GNU diffutils (which comes with git) which works fine

diff --version diff - GNU diffutils version 2.7

christiaanwesterbeek commented 11 years ago

Thanks. I did. I posted the error in the console in the new issue splitted from this one created by Brad

C:\Users\Christiaan>diff --version diff (GNU diffutils) 2.8.7 Written by Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, and Len Tower.

Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

christiaanwesterbeek commented 11 years ago

I got it fixed. I now have installed only TortoiseSVN and GitHub for Windows and added these to my PATH.

C:\Program Files\TortoiseSVN\bin C:\Users\christiaan\AppData\Local\GitHub\PortableGit_015aa71ef18c047ce8509ffb2f9e4bb0e3e73f13\bin

I had to reboot after adding to PATH, because diff and git didn't work on the command-line. After reboot they did. Now I have my icons in the gutter in Sublime. Now I can deinstall Netbeans (>200MB beast). I like.

bradsokol commented 11 years ago

Glad to hear you like it.

FYI, the latest update to VcsGutter has an option in settings to specify the path for diff, git, etc. They are no longer required to be on the PATH.