using hooks with git source control from Matlab. Hooks that work from outside Matlab are not executed from within.
Hello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
TobiasHello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
Tobias Hello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
Tobias source control, git, hooks MATLAB Answers — New Questions