Sublime Forum

TortoiseSVN, TortoiseGit and TortoiseHg Plugin

#9

@firefusion

Can you try pasting this command into your console and see if you get any result? You should do it when you have a file open that is inside of your Hg working copy.

sublime.active_window().active_view().run_command('tortoise_commit')
0 Likes

#10

Also, when trying to work out why key bindings aren’t working, it’s handle to run sublime.log_commands(True) in the console, to verify that the commands are actually being run.

0 Likes

#11

Ok I get this error in the latest ST

Traceback (most recent call last): File ".\sublime_plugin.py", line 243, in run_ File ".\Tortoise.py", line 50, in run File ".\Tortoise.py", line 17, in get_vcs File ".\Tortoise.py", line 194, in __init__ File ".\Tortoise.py", line 127, in find_root File ".\ntpath.py", line 205, in dirname File ".\ntpath.py", line 170, in split File ".\ntpath.py", line 125, in splitdrive TypeError: 'NoneType' object is unsubscriptable

0 Likes

#12

Any ideas?

0 Likes

#13

?

0 Likes

#14

From what I can tell, you were trying perform VCS operations on a file that had not been saved yet. I updated the plugin on Github (github.com/wbond/sublime_tortoise) last night to show an error when this happens.

Last night I also add context menu and sidebar menu support to the plugin. I should be publishing these features later today.

0 Likes

#15

I’ve pushed the latest version to Github (github.com/wbond/sublime_tortoise), which contains context and sidebar menu commands, plus a keyboard shortcut for reverting a file.

0 Likes

#16

Ok I get the following error message…

http://dl.dropbox.com/u/497583/screenshots/tortoisehg_sublime_error.png

I have this in that config file. I don’t have a hgtk.exe anywhere so I used hg.exe. Is that ok?

{
	// "svn_tortoiseproc_path": r"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe",
	// "git_tortoiseproc_path": r"C:\Program Files\TortoiseGit\bin\TortoiseProc.exe",
	 "hg_hgtk_path": r"C:\Program Files\TortoiseHg\hg.exe", 
}
0 Likes

#17

@firefusion

Well, hg.exe won’t work since that is the command-line version of mercurial. It is odd that you don’t have an hgtk.exe - what version of TortoiseHg are you running? I have hgtk.exe in version 1.1.9.1.

0 Likes

#18

I’m running TortoiseHg 2.0.2 (with Mercurial 1.8.1) for windows 7 64bit. I’ve been using it since TortoiseHg 1.1.5 (with Mercurial 1.7). It’s totally weird. I tryed repairing the install but it hasn’t added it :stuck_out_tongue:

0 Likes

#19

A removal and reinstall didn’t help either :stuck_out_tongue:

Very strange. Must just be my karma.

0 Likes

#20

TortoiseHg 2.0 has migrated to PyQt from PyGtk.
I suppose hgtk.exe doesn’t exists anymore and was replaced with a new executable, check your installation folder and try with the exe files it contains.
With a little luck it could work without changing the ST2 plugin source.

0 Likes

#21

Well it would appear that hg.exe opens cmd so it looks like the replacement but this plugin won’t accept that as the file.

0 Likes

#22

Nope, hg.exe is the standard Mercurial binary, not the TortoisHg that I suppose this plugin need.

Sorry I don’t have a TortoisHg installed and couldn’t install it.
Look for something like hgqt.exe or thgqt.exe

But maybe the command line parameters as changed and the plugin is not compatible.

0 Likes

#23

@firefusion

I’ve updated the plugin to work with the new exe filename for TortoiseHg 2.x. You can grab the latest version from github.com/wbond/sublime_tortoi … all/master.

0 Likes

#24

Ok the context menu items show up but it’s still not working. I’m not sure what I’m meant to have in Tortoise.sublime-settings. If I uncomment the default and change the file name to thg…

{ "hg_hgtk_path": r"C:\Program Files\TortoiseHg\thg.exe", }

I get this error…

http://dl.dropbox.com/u/497583/screenshots/st-tor.png

If I fix it to what I think it should be it doesn’t work.

{ "hg_hgtk_path": "C:\\Program Files\\TortoiseHg\\thg.exe" }

0 Likes

#25

@firefusion

You are good at finding all of my bugs. :smile: Sorry for all of the little glitches along the way. I have fixed the plugin so the example settings file is correct and so that settings are properly used. Be sure to grab the latest zip from github.com/wbond/sublime_tortoi … all/master.

That said, you should not need to set anything in your Tortoise.sublime-settings since you have TortoiseHg installed in a default location.

0 Likes

#26

[quote=“wbond”]@firefusion

You are good at finding all of my bugs. :smile:[/quote]

Yeah sorry :smile:

Still no luck with the new build and no lines in the sublime-settings file. I did notice that if I launch thg.exe manually it opens the tortoise workbench after the command line. I tried change the plugin to just hg.exe as it looked like the only other files that it might be but still no luck :stuck_out_tongue:

0 Likes

#27

@firefusion

What does your console say?

Try commenting out all of the settings in Tortoise.sublime-settings and see if it works. I was successfully running TortoiseHg with custom settings and with default settings on the latest version of Sublime Tortoise.

0 Likes

#28

Ok this is what it says on startup with a fresh tortoise download and without the custom path setting active. No error or anything is output when I try any of the commands (via right click or shortcut).

startup, version: 2050 windows x64 channel: dev executable: /C/Program Files/Sublime Text 2/sublime_text.exe working dir: /C/Windows/system32 packages path: /C/Users/robin/AppData/Roaming/Sublime Text 2/Packages settings path: /C/Users/robin/AppData/Roaming/Sublime Text 2/Settings error parsing session: No data at: 0:0 PackageSetup not required catalogue loaded found 1 files for base name Default.sublime-theme found 6 files for base name Default (Windows).sublime-keymap found 1 files for base name Default (Windows).sublime-mousemap found 1 files for base name Main.sublime-menu Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\comment.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\copy_path.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\echo.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\exec.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\find_under_expand.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\font.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\kill_ring.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\mark.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\new_templates.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\paragraph.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\save_on_focus_lost.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\scroll.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\side_bar.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\sort.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\transform.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Diff\diff.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\HTML\html_completions.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\HTML\zen_core.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\Tortoise\Tortoise.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\A1Zen.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\dynamicsnippets.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\initzen.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\multizen.py Reloading plugin C:\Users\robin\AppData\Roaming\Sublime Text 2\Packages\ZenCoding\zc.py loading bindings loading pointer bindings theme loaded app ready loaded 1147 snippets

If i try with the custom path setting nothing happens still on keyboard commands or using the right click items.

Writing file /C/Users/robin/AppData/Roaming/Sublime Text 2/Packages/Tortoise/Tortoise.sublime-settings with encoding UTF-8
reloading /C/Users/robin/AppData/Roaming/Sublime Text 2/Packages/Tortoise/Tortoise.sublime-settings
0 Likes