Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to create a new user in the visual-svn server using java svnkit API.

I want to add that user to one group programatically.

Does anyone know how I can accomplish this?

share|improve this question
1  
I suspect that you can't, having read this –  Tom O'Connor Mar 16 '12 at 12:56
add comment

1 Answer 1

Is the SVNKit a requirement for you?

VisualSVN Server can be managed via WMI (Windows Management Instrumentation) interface, so you can write a code in C#, VBScript, VB .Net to manage VisualSVN Server.

MOF file which describes the VisualSVN Server interface resides in the %VISUALSVN_SERVER%\WMI on the computer where VisualSVN Server is installed.

Check the MSDN article: http://msdn.microsoft.com/en-us/library/aa384642

I'm including the following samples for your reference:

  • This C# code will create a Subversion user 'user1' with password 'secret'.

        ManagementClass userClass = new ManagementClass("root\\VisualSVN", "VisualSVN_User", null);
    
        // Obtain in-parameters for the method
        ManagementBaseObject inParams =
            userClass.GetMethodParameters("Create");
    
        // Add the input parameters.
        inParams["Name"] = "user1";
        inParams["Password"] = "secret";
    
        // Execute the method and obtain the return values.
        ManagementBaseObject outParams =
            userClass.InvokeMethod("Create", inParams, null);
    
  • This C# code will create a new repository 'Repo1'.

        ManagementClass repoClass = new ManagementClass("root\\VisualSVN", "VisualSVN_Repository", null);
    
        // Obtain in-parameters for the method
        ManagementBaseObject inParams =
            repoClass.GetMethodParameters("Create");
    
        // Add the input parameters.
        inParams["Name"] = "Repo1";
    
        // Execute the method and obtain the return values.
        ManagementBaseObject outParams =
            repoClass.InvokeMethod("Create", inParams, null);
    
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.