tortoisesvnmerge-conflict-resolutionshelving

Meaning of 'theirs' and 'mine' in unshelve conflict


For partitioning a bigger commit into compilable portions, I decided to shelve[1] all files but one unit (say A.cpp and A.h).

To get rid of trivial errors in a related file (say R.cpp) that was also shelved, I made a few changes to it. After fixing the errors, I committed the first portion, including the minor changes in R.cpp.

I unshelved the remaining files as to get the next portion done. I got a file conflict in R.cpp that I expected to be resolved by one click.

There are these options:

TortoiseSVN explains mine as uncommitted changes in my working copy and theirs as committed changes in the repository (don't remember where).

Since I knew that I committed the changes in R.cpp, I chose mine to get the shelved version. But this turned out to be wrong.

Is there an explanation that helps to prevent future confusion?


[1] TortoiseSVN (1.14.*) provides a working shelving feature, they explain:

The shelving feature is still marked as experimental.

That means that while shelving works as advertised, it is still in a stage where it's heavily improved and worked on. That also means that there's no guarantee that the shelves you create are upwards compatible and future versions might not be able to use them. And of course the UI might change as well in future versions to accommodate new features and behaviors.


Solution

  • Shelving is best compared to interactions with some local repository.

    Shelving is like committing changes in your working copy to the “shelf repo” (and doing a revert after that).

    Unshelving is like updating your working copy from the “shelf repo” that contains earlier changes.

    So Theirs always refers to the “shelf repo”. And Mine to the current (and already committed) revision in your working copy.

    To prevent the conflicts introduced by minor adjustments, you may revert the changes of the last commit in R.cpp before unshelving.