Home Home
  login

Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Gemini - SVN Integration

add-ons

The addon for integrate Gemini and AVN only works with a user configured in the properties of the hook program. I managed to tell Gemini that the author is who is doing the comment in the issue. In the example, as you sign in as manager, every commit comment is associated to this user, with this fix the comment is associated to the commit author.

To use this you need to use the same username in Gemini and SVN, so you look up for the user (to do the login in Gemini you use any user or the admin user) matching the author name and associate the commit comment to this user. Also you need to edit a source file (PostCommitHandler.cs) of the hook program:

internal class PostCommitHandler
    {
        internal int Handle( string repositoryPath, int revisionNumber )
        {

            ....
            ....

            IssueCommentEN sourceControlComment = new IssueCommentEN();
            SourceControlEN sourceControlFileLink = new SourceControlEN();
            DiagnosticsManager.TraceMessage("Searching users...");
            UserEN[] users = Program.GeminiServiceManager.UsersService.GetUsers();
            DiagnosticsManager.TraceMessage("Users: "+users.Length);
            UserEN gemUser = null;
            foreach (UserEN user in users) {
               DiagnosticsManager.TraceMessage("USER: "+user.UserName);
               if (user.UserName.Trim().Equals(author.Trim()))
               {
                    gemUser = user;
                    break;
                }              
            }
                                              
            if (gemUser != null)
            {
                DiagnosticsManager.TraceMessage("Found Author: " + author + " UserID: " + gemUser.UserID);
                sourceControlComment.UserID = gemUser.UserID;
            }
            else
            {
                DiagnosticsManager.TraceMessage("not Found Author: " + author);
                sourceControlComment.UserID = Program.GeminiServiceManager.UsersService.WhoAmI().UserID;
            }
            //sourceControlComment.UserID = Program.GeminiServiceManager.UsersService.WhoAmI().UserID;
              
Best regards

casagrandeale
· 1
casagrandeale
Replies (1)
helpful
0
not helpful

Casagrandeale:

Thanks a bunch for this post. Please see my follow-up and modifications at this thread: http://support.countersoft.com/forums/thread/12118.aspx.

You pointed me in exactly the right direction.


dgsiss
· 1
dgsiss