[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ptp-user] New PTP user with Synchronization issues
- From: John Eblen <jeblen@xxxxxxx>
- Date: Wed, 16 May 2012 16:51:30 -0400
- Delivered-to: email@example.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=/6A38bmwosR71TgSPKRKokbx7DgiSlhqnYOyZo7S7dc=; b=f/M9tPLx2g4550HOSVmDmJ7ISLHGGmAFEUx6x3VyuM3/J3/41B6tPm93WbAwxNdm6h Q8hX4Gxyr762DkCFjs30QEr4u7e4t1koHLk2DPvw4PVImeA8ZnRtDyEf99v/ej+wVDar 7LVoM/5LFwa4FI4RjpLj4rvLACbDKAdQAKO8ujzC2mZYo9oFYExwez82tDPzEwNfAnpj YAkC82hnwASWXx0AhYAEZR2wfKOybhDCyD+lOr09tQgVCiIGda3Z8BA1C/Z7vqJF8GA9 ade8Lf740/Eywg0wAmW8a7vQvBMUrLxsZihm9JwZGZOghCnechodDcRtZbaMzSbeGtLm buyw==
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
On Wed, May 16, 2012 at 3:07 PM, Dale Davis <shimrot2@xxxxxxxxx>
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.
On Wed, May 16, 2012 at 9:18 AM, John Eblen <jeblen@xxxxxxx>
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?
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?
ptp-user mailing list
ptp-user mailing list
ptp-user mailing list