You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project that I am working with, I have a pre-push hook that runs tests before pushing to upstream. The setting live_panel_output is True so the test results are displayed on live. When something is wrong, I do wish to abort the hook and the test.
It is not obvious to me how it could be implemented. Basically, we need to be able to run p.kill() for the git command subprocess. Though I am worried about thread safeness.
The text was updated successfully, but these errors were encountered:
Okay, I think that's straight forward to implement. If you have a proc = Popen(...), you can friendly use proc.terminate() to stop it. terminate is afaik totally permissive t.i. you can call it multiple times or even when the proc already is done.
What I would do: associate the current proc with the active panel.id() (which should be a ViewId) in a simple global map. Like
Then for the panels, mark them as usual with a type e.g. git_savvy.live_output_view, and attach a handler e.g. ctrl+z to them. (I just assume that panels receive key bindings as all other views.) In the TextCommand get the proc for self.view.id() and try to terminate() it.
It could be that after that communicate throws. Or GitSavvy because of the exitcode.
In a project that I am working with, I have a pre-push hook that runs tests before pushing to upstream. The setting
live_panel_output
isTrue
so the test results are displayed on live. When something is wrong, I do wish to abort the hook and the test.It is not obvious to me how it could be implemented. Basically, we need to be able to run
p.kill()
for the git command subprocess. Though I am worried about thread safeness.The text was updated successfully, but these errors were encountered: