Ok, progress!
I commented out a try…catch in process_status:
#try:
status = vcs.check_status(path)
#except Exception as exception:
#sublime.error_message(str(exception))
This, oddly, makes the plugin work fine.
This confused me, so I added a debug line after it:
if settings.get('debug'):
print('check_status for', path, 'returned', status);
Adding this makes all hell break loose (since it’s called many times for any file it seems):
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\sublime_plugin.py”, line 722, in is_visible_
ret = self.is_visible()
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 71, in handler
res = fn(self, *args, **kwargs)
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 242, in is_visible
return self.get_vcs(path).get_status(path) in
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 551, in get_status
return self.process_status(hg, path)
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 371, in process_status
status = vcs.check_status(path)
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 645, in check_status
result = proc.run().split(’\n’)
File “C:\Cloud Sync\OneDrive\Portable Software\Sublime Text 3\Data\Packages\Tortoise\Tortoise.py”, line 569, in run
return proc.stdout.read().replace(’\r\n’, ‘\n’).rstrip(’ \n\r’)
TypeError: expected bytes, bytearray or buffer compatible object
I’ll keep digging.
Once again, thanks for the hint to disable exception handling. Feel like I’m getting somewhere!
Cheers,
Westy