Bug 21612 - [CVS Sync View] Usability problem when synchronzing projects without metadata
Summary: [CVS Sync View] Usability problem when synchronzing projects without metadata
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: faq
: 28290 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-16 02:58 EDT by Markus Kohler CLA
Modified: 2004-03-24 21:24 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kohler CLA 2002-07-16 02:58:50 EDT
The task is to synchronize a project that doesn't have CVS metadata with a CVS
server, where the project already exists ( we had to move projects from one
repository to another). The project on the local disk might have some files
which are different from the versions in the repository. 

In this case Eclipse asks if it should synchronize the project with the
repository, which is a good thing. Unfortunately finding the  next steps is not
very intuitive. 
Eclipse first shows that there are conflicts for all files. Since there is no
common ancestor the 3 way comparsion view only shows red boxes. It would be
better for example if  Eclipse would switch to the 2 way view automatically.
The next problem is that "override and update" just does an update( I learned
that this is expected, but it's IMHO not obvious). One has to use the "Compare
file Contents" menu, which is very difficult to find. Using this works more or
less as expected. If only "Synchronize" menu is used the project get's never
synchronized completetly. One has to do to a "manual" update or commit. 

Maybe Eclipse could warn the user or give it a hint that "compare file contents"
should be used. 

I also noticed that when doing this somehow the history got incorrect dates and
also sometimes just disappeared for some files.
Comment 1 Michael Valenta CLA 2002-09-06 18:08:58 EDT
We should do something for 2.1 even if it's just better help/doc
Comment 2 Michael Valenta CLA 2003-01-07 11:19:17 EST
*** Bug 28290 has been marked as a duplicate of this bug. ***
Comment 3 Dave Neary CLA 2003-02-18 10:49:06 EST
I recently had to do just this, and the only way I managed to do it (and keep my
sanity) was by moving outside the workspace idea altogether. 

I checked out a fresh copy of the repository sources into a new project, and
then recursively copies the non-cvs controlled copy on top of the workspace
managed files. Workspace->refresh, followed by CVS->Synchronise (which gave lots
of non-existent local modifications, and a few conflicts), and a slow manual
merge of the local sources, and I emerged with my sanity intact.

It would be nice to be able to check out sources on top of an existing
workspace, but I don't believe CVS would stand for it. It's quite difficult to
see what semantics this would have... would you treat the local sources as a
branch which got branched off from the initial version of the repository and do
an update -j? How would you handle files with changes from the repository
version? What version would you use for their baseline? 

Cheers,
Dave.
Comment 4 Marco Qualizza CLA 2003-03-12 13:24:55 EST
The problem with using the "compare using file contents" option is that it
doesn't modify CVS/Entries (to add files which actually exist in CVS, but which
are marked as unknown locally).

So, you end up with two possible outcomes:
1. Don't compare file contents -- this leaves you with a conflict or two ;-)
2. Comppare file contetns -- no conflicts are show, but Entries aren't updated,
which means you have to resort to 1.

  After much pain, I think I've figured out a workflow which makes this all
doable (remember, I'm working with a workspace > 10,000 files.  going a file at
a time is not feasible):
1. get a project without metadata
2. checkout the same project from CVS
3. copy the metadata-less project over the project with metadata
4. synchronize with repository

Testing it right now -- I'll add a comment if it didn't go exactly as planned.
Comment 5 Marco Qualizza CLA 2003-03-12 13:56:09 EST
No, that didn't work as planned.  Instead of conflicts, they're out-going
changes.  And, again, comparing file contents "hides" that fact, until you do a
sync. without comparing file contents.
Comment 6 Dave Neary CLA 2003-03-25 12:07:31 EST
The following is a reasonable attempt...

1) Check out the CVS into a fresh directory structure
2) cd projectWithoutCVS; tar cf - . | (cd ../projectWithCVS && tar xf -)
3) refresh workspace
4) CVS update (not synchronise). This updates the Entries, and sets local status
to Modified based on contents rather than timestamps.
5) Resolve conflicts, if there are any.
6) There is no 6.

This is what I was getting at in my earlier comment, albeit not too clearly :)
The trick is to avoid the Synchronise view most of the time, since it has a few
problems...

Cheers,
Dave.
Comment 7 Michael Valenta CLA 2003-04-04 10:09:39 EST
A small description was added to the doc for 2.1.
Comment 8 Michael Valenta CLA 2004-03-24 21:24:32 EST
The sharing wizard has improvements in M8 which address these issues. When 
sharing against a project that exists, all files whose contents match that on 
the server are marked in-sync and the user is left to deal with only the files 
whose contents differ.