Tortoise SVN: Resolve conflict using 'theirs'. What does it mean?

SvnVersion ControlTortoisesvn

Svn Problem Overview


Can someone please explain the difference between the following two options of Tortoise SVN on conflicted files:

  • Resolve conflict using 'theirs'.
  • Resolve conflict using 'mine'.

On a side note. Why on earth no one has ever reported this confusing use of terminology as a bug?

Svn Solutions


Solution 1 - Svn

Resolve conflict using 'theirs' means that when you try to check in two files that have conflicting edits, SVN will discard your changes and use the other persons change instead.

Resolve conflict using 'mine' means that you will discard their changes, and use your version of the file instead.

Solution 2 - Svn

I wanted to add the whole list for further reference:

(e)  edit             - change merged file in an editor
(df) diff-full        - show all changes made to merged file
(r)  resolved         - accept merged version of file

(dc) display-conflict - show all conflicts (ignoring merged version)
(mc) mine-conflict    - accept my version for all conflicts (same)
(tc) theirs-conflict  - accept their version for all conflicts (same)

(mf) mine-full        - accept my version of entire file (even non-conflicts)
(tf) theirs-full      - accept their version of entire file (same)

(p)  postpone         - mark the conflict to be resolved later
(l)  launch           - launch external tool to resolve conflict
(s)  show all         - show this list

Solution 3 - Svn

I agree.

Seems to me that it would be more clear if it said:

  • Resolve using repository (theirs)
  • Resolve using working copy (mine)

Solution 4 - Svn

The SVN command line merge is confusing especially when merging a branch back into the trunk. "My changes" are the ones I made in the branch, but that would be wrong according to SVN. To really complicate things, SVN refers to the paths as SOURCE, TARGET, and HEAD in the command line help.

Here is the simple answer, if you run this merge statement from the directory C:\Project1\Trunk

svn merge -r 60:68 C:\Project1\branches\UpdatesToProject1

"Mine" is the directory that SVN is being run from (C:\Project1\Trunk).

"Theirs" is the directory that you are merging in and have specified on the command line (C:\Project1\branches\UpdatesToProject1)

It would be really really nice if SVN gave the paths that MINE and THEIRS refer to.

Solution 5 - Svn

BuzzAnn is correct. mine vs theirs is ambiguous, since what's in the repository might also be mine. The unambiguous distinction is repository vs local copy.

Solution 6 - Svn

If you accept that what is in the repository is no longer (solely) yours, it is shared with all that have access, then it might be clearer.

In this context:

"theirs" means "the team's shared code in the repository" "mine" means (my)"working copy" (probably on local machine)

So: "using theirs" replaces your working copy with the shared copy, discards your changes that exist on your local machine. "using mine" deciding that the code in your working copy is what should be kept in repository, discarding what is currently in the repo.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMuhammad Hasan KhanView Question on Stackoverflow
Solution 1 - SvnBrandonView Answer on Stackoverflow
Solution 2 - SvnnerknView Answer on Stackoverflow
Solution 3 - Svnjames2codeView Answer on Stackoverflow
Solution 4 - SvnK KimbleView Answer on Stackoverflow
Solution 5 - SvnDave SievingView Answer on Stackoverflow
Solution 6 - SvnptarmiganView Answer on Stackoverflow