Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Conflict merge in Synchronize window - But Text Compare window is not showing any RED color conflict(Conflict visibility issue in Eclipse)
icon4.gif  Conflict merge in Synchronize window - But Text Compare window is not showing any RED color conflict [message #774678] Wed, 04 January 2012 11:45 Go to next message
Arun Sangal is currently offline Arun SangalFriend
Messages: 3
Registered: January 2012
Junior Member
---FYI---
On one of our Build server : CVS Client/Server version is: 1.11.2
On the main CVS Repo server : CVS Client/Server version is: 1.11.22
---------

Hi

I have a file service.config in branch "stp_01_03_03_pre". Tip version is 1.16

I want to merge code changes (delta) from another branch "ach_11_08_rel" between it's root tag and the latest build fromm this another branch --OR tip of this another branch.

Case 1:
Running cvs command line mode for merging:

cvs co -P -kk -r stp_01_03_03_pre -j Root_ach_11_08_rel -j ACH_LATEST_BUILD01 config

Output:
...
....
cvs checkout: nonmergeable file needs merge
cvs checkout: revision 1.14.132.1.4.1 from repository is now in config/config/services/stp2prod/DataAccessService/1/0/service.config
cvs checkout: file from working directory is now in .#service.config.1.16
.....
......
later, I committed it and it was successful. State of the file was in "M" (not
in "C").


Here, in CVS version control:
- config is the module,
- delta will be taken from ach_11_08_rel branch between Root_ach_11_08_rel and the
2nd -j build
- COmmand will checkout and perform merge at the same time (i.e. co + update).
- Root_ach_11_08_rel version is: 1.14.32.1
- ACH_LATEST_BUILD01 build tag version is: 1.14.132.1.4.1
- stp_01_03_03_pre (in target branch file's tip version is: 1.16
- stp_01_03_03_pre branch - created from latest TRUNK/HEAD code after
Root_ach_11_08_rel was created sometime back.
- Result is (after I committed the merged data): Few lines in file "service.config"
got removed after the merge as they were treated as "BLACK" colored changes
(Outgoing change) in eclipse. The thing is, these lines were never committed in
the file in "ach_11_08_rel" branch BUT were committed after ach_11_08_rel was
created sometime back. Now, stp_01_03_03_pre had these lines (which got removed
after the merge) as this target branch was created from a recent TRUNK/HEAD
version.
- Ran this command from a liunx server (our build server) which has 1.11.2 as CVS
client installed on it.
- On actual CVS repo server, CVS Client/Server version is: 1.11.22


Case 2:
Did the same thing in Eclipse... manually to see how CVS merge is removing the lines in "stp_01_03_03_pre" branch for file "service.config"

steps:
a. checked out the module "config" from "stp_01_03_03_pre" branch
b. Did, Team+Merge, provide start+end tag as "Root..." and "ACH_...BUILD01" (im not
writing the full values here.
c. Did the merge with preview only.
d. In Eclipse Sync window, I'm seeing that file "service.config" is showing in RED
color icon "<>" (which means, this file has some conflicts and it has to be
manually resolved). Now, NOTE: when I ran CVS co -j -j.. command above and
committed the merged data, it was successful (without me doing anything).

e. Double clicked the file, it opened the file in Eclipse Text compare window
(Please see Attached and look for circles showing COLOR issues).

First of all, I'm just WONDERING... WHY ECLIPSE is NOT showing the "RED" color
conflict changes in the file (as usually seen in the vertical scrollbar).

Secondly, Sync window shows file has a conflict (due to RED color <> icon next to
it), but in Text compare window, the "[]" box just on the vertical scrollbar is
NOT filled with RED color (showing somewhere in the file, there is a code
conflict). It should show that little sqaure box in RED, IF Sync window is
showing RED "<>" icon infront of "service.config" file.

Text compare window shows body of a file - changes either in:
-- BLACK (outgoing change/workspace addition/removal),
-- BLUE (Incoming change/repository addition/removal) or in
-- RED color (Conflict change/addition/removal).

Apart from this, just on the vertical scrollbar (right side file area), vertical
scrollbar has a little square box "[]" filled in either "RED", "BLUE" or "GREEN".
-- BLUE saying code changes exists, manually / automatically resolve.
-- RED saying code conflict exists, manually resolve / auto complete all right
hand side (remote) changes to left (local).
-- GREEN saying - merges / changes are complete.



Any ideas!!!! what Eclipse is missing.

[Updated on: Wed, 04 January 2012 18:30]

Report message to a moderator

Re: Conflict merge in Synchronize window - But Text Compare window is not showing any RED color conf [message #774842 is a reply to message #774678] Wed, 04 January 2012 18:46 Go to previous messageGo to next message
Arun Sangal is currently offline Arun SangalFriend
Messages: 3
Registered: January 2012
Junior Member
OK.

The above output in the post related to "nonmergeable"...for cvs command can be removed.

Output:
...
....
cvs checkout: nonmergeable file needs merge
cvs checkout: revision 1.14.132.1.4.1 from repository is now in config/config/services/stp2prod/DataAccessService/1/0/service.config
cvs checkout: file from working directory is now in .#service.config.1.16
.....

Here, the case is:
1. File service.config is actually looks like a text file (ASCII) when you open/see in an editor BUT actually in CVS settings, developers have set the FORMAT of the file as "Binary (-kb)". This can be seen in Eclipse by right clicking on the file (in resource/Java view/pane window after you checkout the content) by selecting either:
- Properties, click on "CVS" on the left pane window of properties popup window.
- If you want to change it, checkout the folder (containing the file), right click on the file, select "Team+Change ASCII/Binary property".

....

Resolution:
1. Until you / developer change the format of the file - manually /automated way using a command / cvswrapper file (inside CVSROOT folder of each repository in CVS)... you'll get the above message and developer's code will be wiped out by doing merges (in the example shown in the post, explained above) as CVS is treating service.config file as "Binary" file and when doing the co+update (in one go or separately)/aka merge, it's just taking everything from the source branch into target branch without doing any real merge / showing any real conflicts.

Now, if you change the file's format to ASCII, and run the same CVS command again or use Eclipse to do the manual merge (Team+Merge+etc)... then, you'll see the REAL "RED" color conflict.


GOOD LUCK.


Now, TO DO tasks:
- It would be good to find files in all CVS repositories which are stored in binary format, so that you can have
developers correct it.
- See, if cvswrappers file (in CVSROOT folder at every CVS repository level) can resolve this without changing the
format of existing CVS binary files (which looks like in ASCII format when you open them in Text editor) i.e.
developer's accidentally stored the file in binary format when they created this "service.config" file in this example.
- use an option in cvs checkout/update/export/import command.. i.e., while doing those operations, CVS can
treat "service.config" file (which is currently in Binary format) as ... ASCII format and gives you a real Merge
conflict.

ex:
***********************************************
***** for module: config
***********************************************

RCS file: /mnt/cvsroot/service/config/config/services/stp2prod/DataAccessService/1/0/service.config,v
retrieving revision 1.14.132.1
retrieving revision 1.14.132.1.4.1
Merging differences between 1.14.132.1 and 1.14.132.1.4.1 into service.config
rcsmerge: warning: conflicts during merge

***********************************************
***** End of services/config
***********************************************
Re: Conflict merge in Synchronize window - But Text Compare window is not showing any RED color conf [message #774855 is a reply to message #774842] Wed, 04 January 2012 19:35 Go to previous message
Arun Sangal is currently offline Arun SangalFriend
Messages: 3
Registered: January 2012
Junior Member
BTW, command to convert a binary file (which actually is not a binary i.e. just a text file) can be converted from binary to ASCII format by using the following command, it commits a new version as well (latest i have is 1.16.12.4 now):

cvs admin -kk "/configRoot120rel/config/services/stp2prod/DataAccessService/1/0/service.config"
RCS file: /mnt/cvsroot/service/config/config/services/stp2prod/DataAccessService/1/0/service.config,v
done
ok (took 0:00.296)


and now if you do a status on the file

$ cvs status -l config/config/services/stp2prod/DataAccessService/1/0/service.config
===================================================================
File: service.config Status: Up-to-date

Working revision: 1.16.12.4
Repository revision: 1.16.12.4 /mnt/cvsroot/service/config/config/services/stp2prod/DataAccessService/1/0/service.config,v
Sticky Tag: stp_01_03_03_pre (branch: 1.16.12)
Sticky Date: (none)
Sticky Options: -kk


Earlier before this, STICKY Option for this file was : -kb

Previous Topic:File tabs disappeared
Next Topic:Eclipse auto build
Goto Forum:
  


Current Time: Tue Apr 16 10:23:43 GMT 2024

Powered by FUDForum. Page generated in 0.97953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top