This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use CVS with linked folders in CCS5

I currently have a project that uses linked source files. I have configured the project to use CVS from within ccs5 and can commit the project to CVS. My problem is that I cannot commit the linked folder/files with the project. If I look at the properties for the linked folder and go to CVS it says "This folder is ignored by CVS." Is there a way I can get ccs5 to include these folder/files when I commit?

  • Chris,

    Sorry for the slow response on this one.  We are actually looking into it.  One of our team was digging into it last week.  It looks like there is a bug in Eclipse itself that is causing this.  So far the fix has not been picked up in mainline Eclipse.  We are going to do some experiments on our side and depending on how they go see if we can't provide a workaround or push the fix on the Eclipse side.

    Regards,

    John

  • There are more details on the issue here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=41929   It describes a workaround which is basically to create another project for the linked folder so that the files are directly in that project and then to link that project to your main project.  Not a great workaround.

    I have pinged the Eclipse community to see when the fix will be accepted (someone created a fix for it).

    I have tried setting up a similar environment in SVN (I don't have CVS).  I have a project "bbb" which is in my SVN repository.  It has some files and folders that are physically inside the project folder.  They show up as managed fine.  I then linked another folder called "opt" to the project.  It and its contents show up in the project fine and build but do not get added to the repository.  I then manually added those files to my repository via windows explorer but they don't show up as managed in the project view.  I can manage them fine via the windows explorer or command line but not via the project UI.  Is that essentially what you are trying to do?

    Regards,

    John

  • I will have to see if that workaround will work for my projects and I hope the real fix is accepted soon.

    That is essentially what I am trying to do.

    Chris

  • How do you properly link another project to the main project? I have tried a few things but so far nothing has worked.

    Thanks,

    Chris

  • Chris,

    I guess there are a few things you could do.  Originally I was thinking that you would need to setup project references/dependencies but I believe we can avoid that.

    To simplify building what I would do is keep your original project that has the linked folders in it.  This way when you build the project it has everything.  Then I would create a new project in the location of the linked folder (or a level up from it).  I would just use that project to perform CVS operations on the contained files and nothing else.

    The main project should build find and the debugger should be able to use it to locate the source files to open during debug.

    Alternatively you could setup the projects for the linked folders to build into a library and then have your main project be dependent on them but that could be very impractical depending on your code.

    What issues are you hitting?  I can get my SVN projects up and running again to replicate.

    Regards,

    John

  • John,

    Thanks for the help. I was able to get one solution somewhat working. I have my main project (with the linked files) setup for CVS. I then have two other projects that contain  common source files that almost never change and project source files that constantly change. I can commit changes for each of these projects as needed but this solution is far from ideal. My one main project now has two extra projects that must be used with it. I fear I will have problems when changing workspaces or transferring this project to others in my group. Is there anything else I could try or is this the best solution until Eclipse gets updated?

    Thanks,

    Chris

    Here is my folder structure:

  • Chris,

    In talking with one of our experts here he suggested something like this:

    -------

    If my cvs checkout folder is C:\cvsrepository\myApplication, then I would probably do something like

     

    MainProject (I use this project for build/debug)

                    .cproject,.project

                    Some source files

                    Linked files to child projects that are based on PROJECT ROOT, that use purely relative path information. (i..e. Add files, select files from CommonSourceDir/src/abc/file.c and then choose Link to Project Root from dialog that pops up).

    CommonSourceDir/Project (I use this dummy project for CVS operations)

                    .cproject,.project

                    Common sources

    ConstantlyChangeSourcesDir/Project (I use this dummy project for CVS operations)

                    .cproject,.project

                    ConstantlyChangeSources

     

     

    The actual workspace would exist in a completely separate location and have nothing in it except .metadata folder, where I import these 3 projects.  Then when someone else needs to get these 3 projects they checkout from CVS to wherever (maybe D:\cvsrep\myApp) and import 3 projects into their own workspace. However, key being directory structure below myApplication is fixed in CVS repository and also on the local drive. 

  • Hi Chris,

    What exact version of CCS are you using (as shown in the Help > About... dialog)?

    Thanks,

    - Baltasar

  • I'm currently using version 5.1.0.09000.

    Chris

  • Hi Chris,

    We've created a patch for you (based on the solution proposed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=41929).  But this patch requires you to upgrade to the latest CCS build first (v5.2.1.00018).  Do not apply the patch on top of your current CCS version.

    Once you've installed CCS v5.2.1.00018, follow these steps to apply the patch:

    1. Open the ccsv5/eclipse/plugins/ directory in Windows Explorer.
    2. Find the two files named 'org.eclipse.team.cvs.core...jar' and 'org.eclipse.team.cvs.ui...jar', and rename them both to have the extension ".jar.orig".
    3. Download the attached file, and unzip it into the ccsv5/eclipse/plugins/ directory.
    4. Start CCS.
       

    Let us know if this fixes your problem.

    Thanks,

    - Baltasar

    plugins.zip
  • Hi Baltasar,

    I ended up having to completely uninstall all CCS versions on my computer and reinstall 5.2.1.00018. I applied the patch and the project now shows my linked source files should be added to CVS. However, if I go to "Team" I cannot commit them. Also, under properties it says my linked folder is "not managed by CVS." How can I get these files to be managed by CVS?

    Thanks,

    Chris

  • Hi Chris,

    To add a resource to source-control, right-click on it in the Project Explorer, and select Team > Add to Source Control...  

    Thanks,

    - Baltasar

  • Unfortunately that option is not available for my linked folder or linked files. Everything is disabled except "Apply Patch." Any ideas?

  • Also if I go to the Team Sync Perspective, I get the option to commit the linked files but this option does not work. 

    Once I hit "Finish" it appears to be committing to CVS but the status box quickly disappears without any errors.

  • Hi Chris,

    What protocol is the CVS server set up for? 

    Thanks

    ki

  • Hi,

    My CVS server is set up for "pserver." 

    Chris

  • thanks. I'm setting up a CVS server here to try to reproduce the issue. I'll keep you posted...

  • Hi Chris,

    Just to give you an update - I was able to reproduce the issue here locally. The issue is being investigated. Hopefully we will have a fix for you soon. Thank you for your patience.

    ki

  • Hi Chris,

    Looks like the original patch provided in https://bugs.eclipse.org/bugs/show_bug.cgi?id=41929 was developed for Eclipse 3.6, so it's not fully working on Eclipse 3.7 (which CCS v5.2 is based on).

    I'm attaching a modified patch which fixes the new problem you're seeing.

    Let me know if you run into any other issues.

    Thanks,

    - Baltasar

    plugins.zip
  • Hi Baltasar,

    I tried the new patch and I am getting the same results. The linked folder is "not managed by CVS" and when I try to commit it, the operation stops without posting any errors. Do I need to reset / refresh something in my project to get the new patch to work correctly?

    Thanks,

    Chris

  • Chris,

    The new patch fixes the context menu action enablement problem.  Now when you right click on your linked file, you should see the action "Add to Version control" enabled. And as long as the physical file, that your project links to, is in the same CVS root as the project, you should be able to add that file to source control, and then edit/commit it.

    - Baltasar

  • When I try "Add to Version Control" I get the message "Not CVS File:..." in the CVS Console. Do I need to do something special in CVS first?

    -Chris