andischerer / atom-svn

SVN integration for atom text editor
MIT License
34 stars 7 forks source link

Any ideas how to uncover why this package isn't working? #5

Closed kaansoral closed 7 years ago

kaansoral commented 9 years ago

I've just started trying Atom after using ST3 for some time, an SVN gutter is the bottleneck for me

This plugin doesn't seem to have any apparent settings/configurations or documentation

Basically, it just doesn't work for me, any ideas for debugging the situation? (Might be the SVN path, I seem to have it explicitly set to /usr/local/bin/svn for Modific/ST3)

Thanks in Advance

Arcanemagus commented 9 years ago

Is svn accessible from the environment Atom is launched in?

If you are on a Mac try launching it from the terminal as apparently OS X runs applications launched from the GUI in an empty environment.

pruchai commented 8 years ago

Same issue here. svn plugin does absolutely nothing. svn binary is installed and available in default $PATH

Arcanemagus commented 8 years ago

@pruchai Can put open the Atom Developer Tools and put a breakpoint at line 279 and check the output of the attempt to run the svn command?

It might not be line 279 for you, you want the line equivalent to line 255 of the source.

pruchai commented 8 years ago

@Arcanemagus

Eh. I am not entirely sure what I'm doing here.... Never debugged any Atom plugins. "run command"? As in with the "run-command" plugin?

If so, I just get

args: ["-l", "-c", "svn"]
Arcanemagus commented 8 years ago

You should be seeing something like this: image

pruchai commented 8 years ago

@Arcanemagus

Man, I don't know what I am doing wrong here, but I can't even get it to go to that breakpoint... The only place where it stops is message-registry.js line 27, and I never set breakpoint there.

screenshot 2015-09-25 14 41 48

Arcanemagus commented 8 years ago

Looks like that's part of the linter package, you probably want to remove that breakpoint (right click -> remove). After that it should hit the other breakpoint within this package whenever it attempts to run an svn command (opening a file, tabbing back to Atom, making a change, ....)

pruchai commented 8 years ago

I disabled all other packages and for a second there saw a message about my SVN being outdated, because the stuff in /usr/bin 1.7.x and the workspace was 1.8.x. I renamed them, so the newer version form /usr/local/bin is used, and now I can not re-produce the breakpoint again. So went back and renamed those files back to see if I can re-produce the error, and its not happening and I can not get to the right breakpoint again.

I am totally confused right now.

Arcanemagus commented 8 years ago

So when you have the newer version of svn as your "default", does this plugin work?

pruchai commented 8 years ago

Nope. Nothing is happening. I see no changes whatsoever. Editing filed that are SVN tracked does not change anything in the gutter or anywhere else. It's like this plugin is not even installed. 0 errors in the console or anywhere else

kaansoral commented 8 years ago

I apologise that I missed the reply that I received 3 days after I created this issue, I must have missed it, since I couldn't supercede or closely-match my ST3 workflow with Atom, I postponed my trials, I don't have the ability to test things further, but as brew and brew/svn is mainly used on OSX, it's a must to add an ability to set the svn command to /usr/local/bin/svn (or some other path)

pruchai commented 8 years ago

@kaansoral: Agree. Some kind of configuration ability is needed, even just to set the path to your binaries, because it is likely that OS of Xcode upgrade would re-create those binaries in /usr/bin

pruchai commented 8 years ago

@Arcanemagus:

Ok, I got somewhere. First of all, I did not realize that the root directory of the project has to be versioned. I was opening the parent, which had multiple projects versioned in different repos in it , so the svn package was not loading.

I now got it to stop at the breakpoint with the following error.

child = Object {error: Error: spawnSync svn ENOENT at exports._errnoException (util.js:814:11) at spawnSync (child_…, status: null, signal: null, output: null, pid: 83196…}

but this error goes away if i change

    child = spawnSync('svn', params)

to

    child = spawnSync('/usr/local/bin/svn', params)

Then i get an error SVN svn-utils TypeError: Cannot read property 'toString' of null but the plugin loads and runs!

Thank you!

Arcanemagus commented 8 years ago

There is a separate svnutils running function from what I saw of the code, you would probably need to configure that as well.

I'm sure the author of this plugin would appreciate a PR to add the ability to configure the svn path, I'll leave this in my to-do as well, but as it works fine for me as is it's very low priority for myself...

Glad to hear you figured it out though!

pruchai commented 8 years ago

@Arcanemagus

Thanks for your help. I just realized how incredibly easy it is to add a settings page to a package. Literally required 5 new lines of code in svn.coffee and 2 lines changed in svn-utils.coffee. I'll do some more testing here and create a PR.

derwaldgeist commented 8 years ago

@Arcanemagus

If you are on a Mac try launching it from the terminal

Thanks, this did the trick for me. I had the problem of packages not being able to access the environment variables quite a lot of time, and I did not know it's that easy to start Atom with all variables by just calling atom in the terminal. Will use this from now on.

jmichaelsturm commented 8 years ago

I am also having the issue described in this thread. When I set the breakpoint as described above and modify my source file under version control, the breakpoint is never tripped and no messages are shown in the console either. Once difference in my configuration is that I am running Windows 7 instead of Mac OS X. Any suggestions for how I can determine if this plug-in is running?

patrickhousley commented 8 years ago

Try taking a look at https://github.com/andischerer/atom-svn/issues/10. When using mac launcher, the app will not be given the profile based PATH variable.

0rvar commented 7 years ago

I will close this issue due to inactivity, feel free to create a new issue of you still experience problems like this.

tnodet commented 4 years ago

@pruchai

Ok, I got somewhere. First of all, I did not realize that the root directory of the project has to be versioned. I was opening the parent, which had multiple projects versioned in different repos in it , so the svn package was not loading.

Thanks for this, I couldn't figure out what was wrong in my case and it appeared to be it!

In my opinion it may be worth mentioning it in the Read-Me, since at least two people had this problem. I'll open a pull request about this :)