Preliminary commits in C # using SharpSVN

I am new to SharpSVN (and quite frankly, quite new to C #). I tried to get a simple pre-commit handler that checks for a comment. (i.e. commit is not executed in the absence of comment)

There are a few posts (like this one ) that are related and useful, but I have a few fundamental questions that prevent me from continuing:

1) How do I get the code as the link above running in C #? (i.e. what C # context would I use - console application? csharp class?)

2) In the context of Windows Server, how can I call my compiled program in C #?

I tried this methodology with no luck.

Thanks in advance.

+3
source share
3 answers

If you create a pre-commit hook, you should call it pre-commit.exe. (Subversion accepts hooks with the extensions .exe, .cmd, .bat and .wsf.)

Hooks exchange data via stdout, stderr, and in some cases stdin, so you must compile the application as a console application.

To get hooked, you must place the EXE file (and the required DLLs) in the hooks directory of the repository.

See How to access file information in a prefetch cache using SharpSVN for some sample code.

+4
source

"" , , . "hooks" Subversion.

pre-commit.bat( pre-commit.cmd).

0
0
source

Source: https://habr.com/ru/post/1760605/


All Articles