Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] New PTP user with Synchronization issues

Hi Again,

I finally installed virtual box with a ubuntu guest on my laptop and tried runnin eclipse with ptp and a synchronized project on that.  However, I'm still running into some issues.

1st.  my original project is from an egit clone.  When the synchronization has completed, a "team synchronize" shows a a lot of extra .ptp-sync and new .gitignore entries.  I understand the reason for these, but don't see how to remove them.  I tried added these to a new .git/info/exclude file, but it doesn't seem to have any effect in egit like it does in the command line git.   I may be doing something wrong but and not sure what.

2nd, my remote build consists of a number of automake configs (which I don't have control over) and which generates a number of files which get synchronized back.  They are spread into a number of directories.  I don't think it's practical to try and add them to the filter list, and since synchronization in one direction is not supported, I don't know how to avoid them.

3rd, these generated files cause sync problems, ending up with "Checkout conflict with files"  on some or perhaps all of the generated files.    Thus, I can no longer complete a synchroization without destroying the whole problem and remote dirs - is there another solution?

Thanks
Kris

On Wed, May 16, 2012 at 3:51 PM, John Eblen <jeblen@xxxxxxx> wrote:
Hi Kris

First, let me clarify a common misconception. Many users confuse synchronized projects with the use of Git and version control. Synchronized projects, however, are designed to work independently of version control, and users, ideally, do not need to know that Git is used "under the hood" (or even what Git is).

Instead, synchronized projects were designed to allow someone to work on a remote project from a local Eclipse session and, as much as possible, have it perform as if the user were working directly on the remote machine. Thus, I encourage you to think of the local Eclipse project directory and the remote project directory as a single space that is being shared. From that vantage point, there are only two spaces - the original Git repository and the Eclipse project where the files were checked out.

Git fully supports the idea of a "working directory" where you may have several extra files not in the repository. Git only stores files that are explicitly added and has mechanisms to ignore other files. So I think you can solve most of your difficulties by thinking of the synchronized project's local and remote spaces as one and by learning more about Git and EGit (and there is a lot to learn at first).

The file permission problem, though, remains, and there doesn't seem to be a simple solution. Stay tuned for more information on that... Git does store permissions and understands them. Windows, however, doesn't have this idea of executable permissions, which is what causes the problem in your case.


Hope this helps
John

On Wed, May 16, 2012 at 3:07 PM, Dale Davis <shimrot2@xxxxxxxxx> wrote:
Thanks John,

I think I understand the issue.  I'm a relatively new git user as well, though I have worked through a few tutorials and read some of the documentation to get my mind around the work flow.   However, I'm not sure what operation could be used to update just the file permissions.  

Even so, if I just updated the file permissions for the current workspace files and sync them back, wouldn't they again be lost when I pulled new changes or checked out a new branch in egit? 

I take it that git doesn't have a file "executable" property like svn does?  I haven't seen anything about existing properties anyway. 


The point of syncing in one direction is I'd like my eclipse session to be the master - at least by default.  Just avoiding certain files is only part of the equation.  It's that I don't want inadvertant changes or build generated files from filtering back into my repository.  Checking file extension are inadequate if there can be generated headers or other files.  

In particular, the generated .ptp-sync entries and plethora of generated .gitignore files are inconvenient.  I tried creating a .git/info/exclude file to skip files, but it didn't seem to take effect in egit repositories, though it worked find in a linux repository.  I'm probably doing something wrong there.

Thx,
Kris



On Wed, May 16, 2012 at 9:18 AM, John Eblen <jeblen@xxxxxxx> wrote:
Hi

Synchronized projects create and use a separate Git repository (in the folder ".ptp-sync") to avoid conflicts with the user's
version control. Files are added to this repository from the project's directory, not from any existing Git repository. Since
Windows file permissions are not compatible with UNIX-style file permissions, that information is lost when files go from
Git to Windows and back to Git.

As a workaround, you can change the file permissions on the remote machine to their correct values and then sync. This will
set the execute permissions correctly in the repository. (It is also possible to set the permissions using the original repository,
if you are fluent with Git.)

Regarding the one-way sync, can you use the file filtering mechanism to filter files on the remote server that you do not want
downloaded to your laptop?


John

On Tue, May 15, 2012 at 4:29 PM, Dale Davis <shimrot2@xxxxxxxxx> wrote:
Hi,

I recently install PTP on eclipse to try using the remote sync support, but ran into a few difficulties and one which is a show stopper.   Hopefully there is some setting which can fix this:
The basic problem is that binary files synced to the remote machine end up without the original unix permissions. 

My eclipse host machine is a Windows 7 laptop.  Eclipse is Indigo Service Release 2 with CDE.  I also have egit 1.3.0  installed and PTP 5.0.7.  
My remote server is a Linux el5 Linux ...2.6.18-274.7.1.el5PAE #1 SMP Mon Oct 17 12:05:46 EDT 2011 i686 i686 i386 GNU/Linux,  though I've tried a 32bit, or 64bit kernels and even older editions.
The remote server git version is 1.7.1

My project is an egit clone originally from a linux machine,  I create a project, then "new->Convert C/C++ or Fortran Project to a Synchronized Project" .  That all seems to go well and I "Sync all Now" and see the workspace files placed on my remote machine fine.  However, they all seem to have 644 unix permission bits, regardless of the original values.

If I instead do a git clone operation on the remote server, from the repository on my Windows 7 laptop, the workspace files do have the correct permission bits.

Any ideas what is wrong?   Without the permission bits this syncronization is not useful..  And, I'm apparently unable to use the remote file support rather than sync because it precludes other use of git (according to a comment I see in a tutorial).



If possible, I'd also like to do a one way synchronization as well.   That is, I just want to push changes from the eclipse session to the remote server, I really don't want the changes on the server to be shadowed back.  Is there a sync mode for that?  


Thanks!

Kris Davis

_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



Back to the top