Checkout Problem (with Message example)

Help
Etienne G
2005-04-21
2013-04-25
  • Etienne G
    Etienne G
    2005-04-21

    Hello,

    I tried to launch the example given with CVSSharplib and I have a problem about the Sandbox :

    Here the error :
      Unable to write outside of sandbox. Attempting to write to path=[C:\xxxxxxxx\debug\module\CVS\Tag]Sandbox path=[C:\temp\module]

    I don't really know why the first path is this one. I tried to check in the sharpcvslib code and I think the problem could come from FileSystem.PathTranslator, in the method :
    public static FileSystemInfo AppendCvs(string fs);

    Don't know if I'm right but I don't know how to solve this problem. I'm sure there is something easy to do or that I don't really use the lib correctly.... but for the moment, I don't know :/

    If you have any idea... (or need more explanation)
    Thank you

     
    • Etienne G
      Etienne G
      2005-04-21

      I forgot to say that I do checkout with a revision.

      Just under the creation of the WorkingDirectory, I add :
      CurrentWorkingDirectory.Revision = "CDM_Version-2-01-0-135";

      It works without revision but it fails with it

       
    • Etienne G
      Etienne G
      2005-04-22

      I found a solution... which is surely not THE good solution but it has fixed my problem.

      in FileSystem.Manager, in change the following method :
      public Tag AddTag (WorkingDirectory workingDirectory, String localPath,String repositoryPath, String stickyTag);

      I changed the build of the tagFile :

      FileInfo tagFile = new FileInfo(Path.Combine(PathTranslator.AppendCvs(localPath).FullName,Tag.FILE_NAME));

      is now :

      FileInfo tagFile = new FileInfo(Path.Combine(PathTranslator.AppendCvs(workingDirectory.WorkingPath).FullName,Tag.FILE_NAME));

      When you use PathTranslator.AppendCvs, it looks if the file exist but it is a directory (the localPath is something like "MyModule/") ... that's why when it builds new filesystem with DirectoryInfo, it use the directory were the dll is located and make something like :
      "C:\xxxxxxxx\debug\module\CVS\Tag"

      I don't know if it helps you but I know my english is not very good so if you need more explanation, just ask.
      But I ask you again; if you have in mind what the problem really come from, tell me.

      Thx

       
      • Hi there, I fixed a few bugs with this over the weekend, could you let me know if it fixes your issue.  Thanks,

        Clayton

         
    • Etienne G
      Etienne G
      2005-05-02

      The problem is still there. Here the stacktrace (if it helps) :

      Unable to write outside of sandbox.  Attempting to write to path=[C:\WINDOWS\system32\MYMODULE\CVS\Tag]Sandbox path=[C:\CHECKOUTPATH\MYMODULE]
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.ValidateInSandbox(String path)
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.WriteToFile(FileInfo cvsFullPath, String line, Boolean append)
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.WriteToFile(ICvsFile[] entries)
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.WriteToFile(ICvsFile cvsFile)
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.AddTag(Tag tag)
         at ICSharpCode.SharpCvsLib.FileSystem.Manager.AddTag(WorkingDirectory workingDirectory, String localPath, String repositoryPath, String stickyTag)
         at ICSharpCode.SharpCvsLib.Responses.SetStickyResponse.Process()
         at ICSharpCode.SharpCvsLib.Responses.AbstractResponse.Process(CvsStream cvsStream, IResponseServices services)
         at ICSharpCode.SharpCvsLib.Client.CVSServerConnection.HandleResponses()
         at ICSharpCode.SharpCvsLib.Client.CVSServerConnection.SubmitRequest(IRequest request)
         at ICSharpCode.SharpCvsLib.Commands.CheckoutModuleCommand.Execute(ICommandConnection connection)

       
      • Actually let's compare steps.  I did a test this morning and managed to get it working, but I may be missing something or have too simple of a test case.  It may be in the modifications that you have made to the example application so if you can send those over via a patch file I can integrate them into the example app and figure out what is going on.

        Using the commandline (and a pre-existing tag called blah) the following worked:

        c:\>cvs -d:pserver:claytonharbour@cvs:/cvsroot/test co -r blah hi

        [cvs server]: Updating hi
        U hi/hi/hi

        Processing time: 0:0:1:593.

        c:\>cd hi

        c:\hi>E:\dev\src\sharpcvslib\sharpcvslib\bin\cvs update

        Processing time: 0:0:0:999.

        c:\hi>cvs update hi

        Processing time: 0:0:1:499.

         
    • Etienne G
      Etienne G
      2005-05-02

      (and if you could fix the CVSRoot problem with the "\" char. I use a domain controller and I must put a "\" in the login... and it doesn't work... Anyway, that's not so hurry, I change it each time ;))