Home » Eclipse Projects » Eclipse Platform » CVS and Eclipse metafiles
CVS and Eclipse metafiles [message #333017] |
Wed, 19 November 2008 15:44 |
Toralf Lund Messages: 70 Registered: July 2009 |
Member |
|
|
I'm having problems figuring out how exactly I'm supposed to use Eclipse
with CVS (or vice versa), and reading the docs or Googling for info didn't
really help, so I'll try posting a question here.
I'm not generally talking about the CVS support within Eclipse itself, but
how to use CVS for special files in the Eclipse workspace. You may wish to
note that I'm fairly new to Eclipse, but have used CVS professionally for
at least 10 years.
Anyhow, some of my questions are:
1. Which of the files should I add to the CVS archive of the ones stored
under .metadata, .settings etc.? All, none, a specific subset? How about
project?
2. If I check out everything read-only (which I've always preferred to
do), Eclipse will complain about failure to store the workspace, and not
let me do "cvs edit" on the files or just remove the write-protection. Is
there any way around this? (Besides changing mode by hand, or NOT
including the read-only option.)
3. How do I handle the conflicts that will generally occur for config
files on every cvs update, providing that someone else has done a checkin?
4. You may have gathered from the above that I'm using the cvs command
line rather than Eclipse's CVS support. Is this just a bad idea? Would I
avoid some of the issues if I used the CVS support in Eclipse instead?
Does is have some sort of special handling for the workspace config files?
I'm currently using Eclipse Ganymede - mainly on Linux, but sometimes also
under Windows XP.
Any help would be appreciated.
- Toralf
|
|
| | |
Re: CVS and Eclipse metafiles [message #333030 is a reply to message #333029] |
Thu, 20 November 2008 14:00 |
Toralf Lund Messages: 70 Registered: July 2009 |
Member |
|
|
Toralf Lund wrote:
> Szymon Brandys wrote:
>>> 1. Which of the files should I add to the CVS archive of the ones stored
>>> under .metadata, .settings etc.? All, none, a specific subset? How about
>>> project?
>> I think that it depends on what you are trying to achieve.
> Well, obviously...
> I think what I want is just to make sure Eclipse understand what it's
> dealing with after a fresh checkout. [ ... ]
>> Generally
>> committing projects along with their .settings is enough. .metadata keeps
>> data specific for your workspace, so I would not consider it as a
>> shareable resource.
> OK. I suppose it's also mostly for .metadata that conflicts will occur...
Unfortunately, some quick tests I just did seem to suggest that .settings
is not enough. What I tried was roughly:
% cp -r workspace workspace2
% find workspace2 -name .metadata -type d -exec rm -rf {} ;\
(to remove all .metadata sub directories from a workspace tree)
Then start Eclipse with "workspace2" as workspace. I then got the Eclipse
welcome page, and when closing it, a normal main window without any
projects listed in the Project Explorer. The original workspace did have
projects, of course, and these were displayed correctly when staring
Eclipse *before* removing .metadata.
In other words, it looks like Eclipse fails to recognise the workspace
and/or project directory if .metadata is left out.
> Thanks,
> - Toralf
|
|
| |
Re: CVS and Eclipse metafiles [message #333043 is a reply to message #333037] |
Fri, 21 November 2008 14:35 |
Toralf Lund Messages: 70 Registered: July 2009 |
Member |
|
|
Szymon Brandys wrote:
>> In other words, it looks like Eclipse fails to recognise the workspace
>> and/or project directory if .metadata is left out.
> You should read "Resources and the workspace" section form Eclipse help.
> To find it, open Eclipse help and go to Platform Plug-in Developer Guide >
> Programmer's Guide > Resources overview.
I can't seem to find that help section, but I think it's starting to
become clear to me, now.
I was sort of wondering how to tell genuine project config files apart
from the ones that contain mere display settings, but I now see that the
important distinction is the one between workspaces and projects.
Apparently, they are more independent than I thought, in that a project
setup may be correct and complete even though the project doesn't show up
in the Project Explorer (see below.) Also, in terms of CVS, what it all
boils down to, is that you can share projects, but not workspaces. (Right?)
> [ ... ]
> Note that if you add project folders to your workspace folder, they will
> not be shown. You have to import them, use New Project wizard and check
> them out from a repo, what will add them to the tree.
Right. This was the part that confused me, really. Intuitively, as long as
the workspace is represented by a folder, I would expect the workspace
viewer to display all subfolders, or all folders of the correct type,
anyway (i.e. the ones containing project definitions.) And seen from a
different perspective, I think I would find the GUI more logical if the
operation was "open project" instead of "import project into workspace".
If you know what I mean...
> When you work with cvs, you need just to share project folders. Then if
> another user checks them out, the project will be imported to his
> workspace and added to the resources tree.
> This is how I work with cvs in Eclipse.
Well, yes, that probably works well enough, really...
Thanks,
- Toralf
|
|
|
Goto Forum:
Current Time: Tue Nov 12 22:21:35 GMT 2024
Powered by FUDForum. Page generated in 0.03480 seconds
|