Subclipse conflict resolution
Asked Answered
I

4

32

Me and my friend using flex builder (eclipse based) with subclipse for a project.

Before committing I always update but sometimes I could not commit because of conflicts. Then I use Team->Synchronize with Repository and it shows at the right side latest from repository and at the left side the my current working copy. It has a button to copy from all non-conflicts from right to left (from latest repository to my working copy). But there are still conflicting lines.

Sometimes I just want to copy from left to right but there is no button for that (I mean overwriting repository file lines with my lines). After copying non-conflicting parts from right to left I just want to commit left side (I want to overwrite and commit my final file to repository). I cannot commit because of these conflict issues. Then my friend can use Replace With-> Latest from Repository command to get latest overwrited version.

Subclipse documentation is weak I could not find any good guide on the Internet. Could you explain subclipse conflict resolution step by step for a dummy like me? A video showing the steps, or an alien technology to fix it quickly will be fine. Are there any better (easier) solution for source control for eclipse?

(I use subclipse 1.4)

Imide answered 8/10, 2009 at 13:59 Comment(2)
sometimes the eclipse ecosystem makes me go mad.Armistice
@Gok: I think there's good news: subclipse at last make the "resolved by mine/theirs/..." work. The bad news is that dialog only appears after click "Mark resolved" (I have already fix all the conflicts by hand before!!!!)Assyria
P
53

Yes, you are right. There is no button for that. in the Diff View(Side-by-Side View) the items in red are in conflict. They can not be automatically merged. You must review the item in conflict and manually resolve it by copying/editing the block of code that is in conflict.

After committing to or updating from repository(Synchronize with Repository) you'll see in the Console view that some items are in conflict. When you take a look at that file in Package you'll see 3 files right next to your original file:

myfile.txt (original file)
myfile.txt.mine
myfile.txt.r3293 
myfile.txt.r3501

Right-click your original file then select Team -> Edit Conflict. In the Diff View provided, edit the file on the left-side to match the final result you want. (i.e. You may want to keep some of your changes and copy over new update from the revision in SVN, discard all changes and only keep your changes, etc.) After you are done, save the file. Right click your original file again then select Team -> Mark Resovled.

You will see that the addition 3 files disappear. You can now "safely" commit your work.

There is no easy way to do this since SVN can't decide what's the best option when such conflict arise.

Piranha answered 8/10, 2009 at 20:54 Comment(5)
SVN doesn't need to decide in this case, OP wants is explicitly asking to override all remote updates with his/her own. See mine-full here: svnbook.spears.at/nightly/en/svn.ref.svn.c.resolve.html subclipse really should have this.Milkfish
@Sequoia, I apologize for the newbie question but I'm confused by the post. It seems like this feature is already committed and checked into SVN's nightly builds? So does that mean in a forthcoming release (1.7.7? 1.8?) it will be available? It would be so great to have resolve/working-copy! thank you!Heliograph
Note that in addition to resolving conflicts you'll need to merge any non-conflicting changes from right-to-left as well. And, after clicking "Team->Mark Resolved", select "Conflicts resolved in file" if you've manually edited like the above answer suggests.Peroxidase
@sequoiamcdowell The link is broken. Equivalent link from waybackmachine is web.archive.org/web/20140717222639/http://svnbook.spears.at/…Irby
Honestly the conflict view of eclipse is just terribad. There is no feature to just jump to the next conflict, If you are trying to use it on a large file with a lot of changes you will go insane.Cerebration
I
11

I know this thread is old, but if someone is looking for an updated answer, my experience can help.
I'm using subclipse 1.8. Right-clicking on the original file and selecting "Mark Resolved...", you'll have several options, among others, take the local file or the base file as the correct version. You can save time with these options.

Impervious answered 14/9, 2012 at 8:1 Comment(0)
M
4

I can't find "Mark Resolved" so instead I clicked "Mark as Merged" after manually deleting the generated files.

Mat answered 10/9, 2013 at 7:31 Comment(2)
This seems to do the same thing.Trantrance
You're probably using Subversive rather than Subclipse.Surfboarding
P
0

Do the following steps:

  • Copy your latest working updates to a safe place.

  • Select the file which has conflicts..right click > select replace with>>Select Latest from Repository.

  • Then go back to your saved working copy and manually replace the current file contents (which has been overwritten in above step) with yours.

  • Then from team select Commit... This way conflicts should be resolved and you saved your latest updates to SVN Repository.

Palter answered 5/3, 2017 at 6:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.