Getting Started

Help
2004-10-21
2013-04-25
  • Angus Black
    Angus Black
    2004-10-21

    I am busy developing a front-end GUI for CVS; I have started using your library. I just need some help getting started. I unfortunately pretty new to C#.

    I have set up a Linux CVS and have two Linux machines talking to each other. I want to develop a Windows GUI to talk to the server.

    I have managed to get the connection done fine; I just want to know how I would get a listing of all the files and directories in the CVSROOT directory?

    Could you tell me where i could maybe get some example code to work with; i have been wading through the documentation and source but not getting anywhere.

    Any help would be greatly appreciated.

     
    • There is a sample gui application in the examples/Messages folder that might be a good start.  The application just shows how to display the events that occur during a checkout.

      To get a listing of all files and directories in the CVSROOT from the server you could do one of the following:
          1) Checkout the CVSROOT directory to your local pc
          2) If you are running against a cvsnt repository you can optionally execute:
              cvs -d:anonymous@your.server.com:/cvsroot/repos ls
             
              --> use cvs --help ls on your cvsnt command line client

      I implemented the ls command last night after I read your post but I have some other changes locally that I need to finish before I check it in.  I will hopefully have it in sometime this weekend if you want to try it out.

      Cheers,

      Clayton

      PS: You should register for the users or dev mailing list.

       
    • Angus Black
      Angus Black
      2004-11-08

      Thanks for the help, just wandering, if I were to Checkout the CVSROOT directory to my local pc, what would I specify the module name to be i.e. when creating the workingdirectory object as such

      WorkingDirectory CurrentWorkingDirectory = new WorkingDirectory(cvsRoot,
                      this.LocalDirectory.Text, Module.Text);

      Thanks
      Angus

       
      • Hi Angus,

        The module name would just be CVSROOT.

        Cheers,

        Clayton

         
    • Angus Black
      Angus Black
      2004-11-09

      Hey Clayton
      I have had a look at the exmaple/Messages app and when i try and compile the code i get the following error:

      ShowOutput.cs(287): The type or namespace name 'MessageEventArgs' could not be found (are you missing a using directive or an assembly reference?)

      I have added a reference to the ICSharpCode.SharpCvsLib and tried adding references to the other .dll's that came with the code but still got the error. What could the problem be?

      Thanks

      Angus

       
      • Try doing a complete build.  So go to the build directory and type:

            build.bat build.all

        This should build the project and examples.  The example application was just designed to show how to listen to message events but it also gives a general idea on how to use the command classes.

        Cheers,

        Clayton

         
    • Angus Black
      Angus Black
      2004-11-11

      Hi Clayton

      Thanks for all the help, got the checkout working 100% in my app, but when I try and import a new module into the repository it adds the module with the correct name but doesnt copy everything in the directory I specify in the working directory. Here is a code segment from the import module; maybe I am just missing something:

      public void CreateNewProj(string newProjLoc, string newProjName)
              {
                  workingDir = new WorkingDirectory(cvsRoot,newProjLoc,newProjName);
                  theCVSConnection.Connect(workingDir,password);

                  ICommand importNewProjCommand =  new ImportModuleCommand(workingDir,newProjName + "created");
                  importNewProjCommand.Execute(theCVSConnection);
                  theCVSConnection.Close();
              }

      Its just strange because the checkout and connect work fine, workingDir and theCVSConnection are declared correctly in another part of the class. newProjLoc is the local location of the directory I want to import and it's got the correct location.

      Sorry to keep bothering you with things that are most probably trivial.

      Thanks

      Angus

       
      • Hi Angus,

        I have not done a lot of testing on the ImportModuleCommand, however it may just need a list of local files/ folders to populate.  This is currently attached to the working directory class as the Folders property.  You can look at Manager.GetFolders for a helper method to populate this.

        Cheers,

        Clayton