svn-scm
svn-scm copied to clipboard
Support client-side commit hook scripts
Offer the same functionality as delivered by Tortoise SVN https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks
In our company, we like using your add-on directly from Visual Code, but then our commit Hook configured in Tortoise SVN is not triggered. We use it for changing our SVN Commit author (a technical name) into a human reable name.
Regards Kristof
Potentially something like this could also be used to avoid comitting buggy changes, e.g. automatically run a test suite before committing. E.g. using a Check-commit
hook. This could provide some value :)
This would be a killer feature.
There's another extension (forked from this one) by @rroman6174 that implements this feature - https://github.com/rroman6174/svn-scm
Thanks for the mention @RLThomaz. My fork is mostly a proof of concept, although it does work for my purposes. The only problem with my approach is that it requires the logic to be written by another extension rather than utilizing a user-supplied command or calling Tortoise SVN's logic.
My use case was that I wanted to be able to interface with some features that were already implemented in a VS Code extension (formatter, linter, etc) and make use of the VS Code API in my hooks.
If that approach is sufficient I could look at making the interface more robust and submitting a pull request, but I don't know if that's what the submitter is asking for here. I think there's value in calling Tortoise SVN to handle the commits using existing commit hooks.
No problem @rroman6174. Yes, I've noticed the limitation to other extensions. Since I needed to execute some shell scripts I just submitted a pull request. It's my first time working with typescript and VSCode extensions, so it may need some work. Nonetheless, it's working locally and I can execute any hook needed.
I like @RLThomaz draft implementation. I can see the benefit of leveraging VSCode feature like formatting and linting but for simplicity i prefer just running a arbitrary user supplied script. However maybe importing a user supplied dynamic module could solve this issue.
Hi, everyone.
Can you guys check if the current draft (PR) is achieving the goals here? It's currently only providing the ability to override arguments for the pre-commit hook, but we should be able to run any hooks as is.
I can continue working on it before merging, or we could merge it and improve as necessary.
Expect this feature to be released!