- 1 Basic Information
- 2 Known Issues
- 3 FAQ
- 3.1 When should I create a Remote Project and when should I create a Synchronized Project?
- 3.2 How do I setup a synchronized project that works with a CVS repository?
- 3.3 How do I setup synchronization for an existing C/C++ or Fortran project, including ones that use CVS, Git, SVN, etc.?
- 3.4 How do I know if a current project is a synchronized project?
- 3.5 I get a Merge conflict for a file that changed both locally and remotely. How do I recover from this?
- 3.6 .ptp-sync is outgrowing rapidly all other directories. Is there any way to reset .ptp-sync ?
- 3.7 How do I convert an existing C/C++ or Fortran project to be a synchronized project?
- 3.8 Why do I encounter multiple errors if I try to work with a copied, moved, or renamed Synchronized Project?
- 4 Change Log
Refer to Synchronized Projects User Guide for basic information.
The July 2011 PTP user meeting user-call recording includes a live demonstration of how to setup and configure a synchronized project. (Note: convert to full-screen viewing via the green square in the lower right corner of the screen to be able to read the contents of the demo screens.)
- The "Build directory" in ('Project' -> 'Properties' -> 'C/C++ Build') does not show the correct build location for remote configurations. Builds should still run in the proper location, though, if set correctly in ('Project' -> 'Properties' -> 'C/C++ Build' -> 'Synchronize').
- There is no wizard to convert existing remote projects to synchronized projects. (See FAQ item below for a solution)
- Deleting synchronized projects often fails on NFS (network file system). See bug 360170. To delete the project, close Eclipse, restart, and then delete.
- There are some potential pitfalls when configuring projects
- On the first page of the new project wizard, users should not select a file system other than the default. This directory must be local. Users specify a remote location on the last page of the wizard bug 356208.
- Users should avoid changing configurations inside the new project wizard, as this will cause errors. Instead, add and change configurations after project creation.
- The Workspace configuration only appears after the project is created.
- The tool chain selected during creation is used for both the local machine and remote machine. Users need to adjust this after project creation.
- For remote configurations, only the "Sync Builder" works, although other options are available ('Project' -> 'Properties' -> 'C/C++ Build' -> 'Tool Chain Editor'). The "Sync Builder" is set as the default.
- Attempting to change multiple configurations does not work correctly.
When should I create a Remote Project and when should I create a Synchronized Project?
Remote projects exist only on a single remote site. So they are a better choice if you need a simple, quick way to work remotely. Synchronized projects add the capability to use multiple remote sites and synchronize between them. The underlying Git tool makes sync'ing very efficient, leading to less network lag time, especially for large projects. Also, synchronized projects exist and can be built both locally and remotely. Even if you are not interested in compiling locally, this can be handy if the connection is unavailable or slow. For example, you can work on the project locally and then, once the connection becomes available, sync your changes to the remote site.
Other benefits of Sync'd projects include
- Local editing offers improvements over editing remote file (some features are disabled in the C/C++ remote editor) (Example: greying out of inactive code works in local editor)
- You can have multiple remote configurations and switch between building on different remote systems.
- The Fortran indexer can run on a local project but not a remote project
A remote project doesn't need to bring the source files to the local client until you request a file for editing or other operation. A synchronized project brings all the files to the local client upon initial sync then only needs to sync changes later, so editing of already-synced files is faster.
A synchronized project will need more networking initially to do the initial sync, but subsequent requests such as to fetch a file for editing are not needed since the file exists locally.
RDT remote projects requires Java on the remote host. Synchronized projects do not require Java on the remote target.
How do I setup a synchronized project that works with a CVS repository?
- Create a new CVS project as usual (right-click in 'Project Explorer' -> 'New' -> 'Other...' -> 'CVS' -> 'Projects from CVS")
- Be sure to select "Check out as a project configured using the New Project Wizard" on the "Check Out As" screen
- After the CVS wizard ends, the "New Project Wizard" begins.
- Create an empty Synchronized project
- Files in the CVS repository are automatically imported on project creation
- Check out a project from CVS into a local project as usual (Check out as C or Fortran project if it isn't already)
- File > New > Other... and under Remote, select "Convert C/C++ or Fortran Project to a Synchronized Project" then select the project and setup (or reuse) a remote connection. Be sure to specify a directory on the remote system for 'Location' where the files will be sync'd to.
How do I setup synchronization for an existing C/C++ or Fortran project, including ones that use CVS, Git, SVN, etc.?
The conversion wizard, described in the User Guide, should work for all of these cases. Synchronization works independently of the user's version control system.
How do I know if a current project is a synchronized project?
Go to the properties page ('Project' -> 'Properties' -> 'C/C++ Build') and see if the 'Synchronize' page is available.
I get a Merge conflict for a file that changed both locally and remotely. How do I recover from this?
- Shut down eclipse.
- Synchronize projects "by hand". This means a couple of "rm -rf" or "scp -r" or "make clean" commands on both hosts, as appropriate. The error message about merge conflicts may direct you to the files that need treatment. -- Or you might remove the whole remote project directory, provided the correct version of the files in question are on the local copy.
- Remove .ptp-sync on >both< hosts.
- Restart eclipse. The latter is necessary to initiate rebuilding .ptp-sync and redo synchronization.
.ptp-sync is outgrowing rapidly all other directories. Is there any way to reset .ptp-sync ?
Proceed as described in recovering from a merge conflict above. Removing and rebuilding .ptp-sync reduces the size. However, this does not fix the root cause for the rapid growth. The current version of eclipse PTP also synchronizes the executables. In a future version the user will be able to select which files are being replicated.
How do I convert an existing C/C++ or Fortran project to be a synchronized project?
'Project' -> 'New' -> 'Other' -> 'Convert a C/C++ or Fortran Project to a Synchronized Project'
Why do I encounter multiple errors if I try to work with a copied, moved, or renamed Synchronized Project?
These operations are not yet supported. See Bug 371507 for details.
- Add ability to exclude or include files during synchronization. See documentation for details and also bug 369284 and bug 369574
- Fixed bug 367662: Remote sync cannot handle spaces in directory
- Fixed bug 369696: Fix deadlock caused by overuse of sync lock
- Fixed bug 370278: Output from build not printed to console until after build completes
- Fixed bug 370838: Context menu not available in Project Explorer for files and folders
- Fixed bug 358141: Local build configurations cannot be changed to remote build configurations
- Fixed bug 357995: Run configuration browse directory operation does not start in project directory
- Fixed bug 358655: Convert to Sync Project Wizard defaults to home dir
- Disable sync'ing before project deletion. See bug 360170.
- Add sync context menu bug 345673.
- Add wizard to convert local C/C++ or Fortran projects to synchronized projects bug 356813.
- Support files with odd characters bug 354893, with the exception of newline characters bug 355270.
- Add ability to turn off error messages bug 355526.
- Fix bug 356633: Failure to add files to repository if a .gitignore file is present.
- Use separate Git directory (.ptp-sync instead of .git) for sync'ing so that it does not interfere with user's Git repository.
- Sync empty directories.
- Prevent users from modifying the synchronization properties of the Workspace configuration.
- Fix bug 349372: Build fails if empty environment variables are present.
- Support managed project types.
- Add Fortran synchronization wizard.
- Do not sync if only a file's markers have changed (prevents sync'ing during file editing if code analysis is turned on).