resolving simple svn conflicts
Asked Answered
K

3

22

I'm a bit of newcomer to using svn on a mac. I'm using Versions.

I've been getting reports that I've been overwriting other devs work, so I'm hoping someone here can make sure I'm doing things properly.

I committed my work last night, the other team members have been working through the night so the first thing I do today is update my repository.

After doing so I receive various files back, I'll use the css file as an example:

myfile.css.r1593
myfile.css.r1587
myfile.css.mine
myfile.css

I have a few questions.

What do each of these files represent?

How should I go about fixing the conflict?

What is the safest way for me to work with svn to avoid overwriting other peoples work and avoid making unnecessary copies of files outside of the repo?

Kurbash answered 7/10, 2011 at 8:59 Comment(0)
C
28

The myfile.css.rXYWZ represent the myfile.css at XYWZ revision.

The .mine file is your original file.

When the file is in conflict in the original file (myfile.css) some markers are added.

To fix the conflict, usually you need to check the files that are marked with conflict and see the differences inside.

Usually your part is marked <<<<<<< .mine The repository part is marked with >>>>>>> .rXYWZ.

Resolve manually the conflict, remove the mine and rXYWZ lines and then type:

svn resolved myfile.css

and then you can commit your file.

Cocotte answered 7/10, 2011 at 9:57 Comment(2)
Thanks Ivan. I'm looking at myfile.css and I can see <<<<<<< .mine but I cannot see any <<<<<<< .rXYWZ Is that normal?Kurbash
mmmm, obviously XYWZ is the revision number so for example you can find something like .r1593. Try to find on the document the <<<<<<< and see if there is something different to mine.Cocotte
L
0

first thing I do today is update my repository

If you didn't get any warning about merge conflicts and started merge-tool, you (I think) have to configure Versions or use more smart tool

What do each of these files represent?

Free files (revisions of myfile.css), needed for resolving confilcts. Oldest revision r1587 - common parent of final files, mine - your file, r1593 - version of your coworker

How should I go about fixing the conflict?

Check conflicted string, tells with authors, find correct4all variation

Lunge answered 7/10, 2011 at 10:27 Comment(0)
L
-2

Please have a look at this alternative.

I have a conflict.

  • Go to the conflicted file on the file system

enter image description here

  • Open "pdf_invoice.php.mine" (or .r4510, or .r4529 if you want to use "theirs") in a text editor.
  • Select all + Copy.
  • Open "pdf_invoice.php".
  • Paste
  • Save it
  • Mark the file as resolved
  • Commit again
Ld answered 9/10, 2017 at 11:26 Comment(1)
Most of the time you want to merge the conflicting files instead of simply overwriting the work of the remote party.Killick

© 2022 - 2024 — McMap. All rights reserved.