Enjoy your day!
Oh, how
terrible the article
alizar hooked.
We take pictures after each commit (Linux, OSX) . But due to the peculiarities of my OS, the proposed solutions did not suit me very well. After spending a little time searching and not getting the desired result, it was decided to do something simple (just for fun, with
Demonix ) to solve this problem ...
Given:
Several clients for different systems (perverted, but what to do)

To find:
Decide how to make a photo from a webcam when committing.
To make the task as simple as possible, I used the
DirectShow .NET library.
')
The main code of the console application:
Image image = Capture.GetImage(); image.Save(path, ImageFormat.Jpeg); image.Dispose();
Client settings:
I created a hook for the Post-commit event, because I wanted to add a revision to the file name.

When you run the command, arguments are automatically added. For different events,
different arguments .
Specifically for the Post-commit event, the arguments are as follows:
PATH DEPTH MESSAGEFILE REVISION ERROR CWD
The result is something like c: \ temp \ svn_134278_2012-07-17_13-54-46.jpg

Anyone can
customize the path and file format.
For TortoiseGit, the settings are almost identical:

On my hardware, the program runs around 00: 00: 03.3676868
before INIT 00:00:00.0000007 before CaptureImage 00:00:00.3365297 before CloseInterfaces 00:00:02.3431425 before Clone 00:00:03.3188398 before save 00:00:03.3235840 end 00:00:03.3676868
Naturally, webcam-snap.exe can be used for any other purposes.
In the future, existing images can be glued together, for example, in the video. The example is not attached, because while I don’t have enough photo commits;)
Github