TSVN 1.8.6 & merge conflict, prefer repository => wrong behavior: chooses local

769 views
Skip to first unread message

Panu Outinen

unread,
May 8, 2014, 4:56:48 AM5/8/14
to us...@tortoisesvn.tigris.org
Hi!

I'm running TortoiseSVN 1.8.6, Build 25419 - 64 Bit on Win7 x64 English.
Server running Subversion 1.7.17 (Centos 6 x64)
svn protocol

Situation: unmodified branch working copy, merging "3rd party vendor
tree" changes into the branch through TSVN's "Merge a range of
revisions" operation, one r-version chosen, defaults on the merge
options (Working copy, only compare whitespaces checked) and there's
going to be bunch of files/folders modified/added/deleted and only
one conflict on a zip thus a binary file => TSVN's Resolve Conflict
dialog comes up.

Now if I choose "Prefer repository" the conflicted file is NOT going
to be the file on repository it will be the local version! Naturally
with the choose of "Prefer local" this will happen as well.

This can be repeated and e.g I can see with Windows Explorer that
there are 3 files correctly in the folder before pressing a button to resolve:
atlassian-bundled-plugins.zip
atlassian-bundled-plugins.zip.merge-left.r637
atlassian-bundled-plugins.zip.merge-right.r638

This errorneous behavior won't happen if I choose Resolve later and
e.g. from the same dialog jump to the conflicted one and choose
Resolve conflict with 'theirs'!

I tested on one virtual machine: Win7 x64 & TSVN 1.8.0 x64 => Error:
Invalid 'conflict_result' argument

Same virtual machine updated to use TSVN 1.8.1 x64 => same problem as
described above!

And I tested with another host WinXP x64 with TSVN 1.7.13 x64 =>
Prefer repository works correctly.

- Panu

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3077825

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

fvp

unread,
May 8, 2014, 6:10:08 AM5/8/14
to us...@tortoisesvn.tigris.org
The svn log message shall be saved in Log History even if 'Cancel' is
clicked.

What I did:
- open repository browser,
- navigate to a branch,
- right-click on the branch directory in the right panel,
- selected 'Delete',
- entered a log message,
- pressed 'Cancel' (by mistake),
- (again) right-click on the branch directory in the right panel,
- selected 'Delete',
- pressed 'Recent messages'.

at this point I did not found the log message entered before pressing
'Cancel'.

TSVN 1.8.6.25419 running on Win7 x64 Ultimate.

Thanks!

Florin Petrov

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3077832

Stefan Küng

unread,
May 9, 2014, 11:32:25 AM5/9/14
to us...@tortoisesvn.tigris.org
On 08.05.2014 10:56, Panu Outinen wrote:
> Hi!
>
> I'm running TortoiseSVN 1.8.6, Build 25419 - 64 Bit on Win7 x64 English.
> Server running Subversion 1.7.17 (Centos 6 x64)
> svn protocol
>
> Situation: unmodified branch working copy, merging "3rd party vendor
> tree" changes into the branch through TSVN's "Merge a range of
> revisions" operation, one r-version chosen, defaults on the merge
> options (Working copy, only compare whitespaces checked) and there's
> going to be bunch of files/folders modified/added/deleted and only
> one conflict on a zip thus a binary file => TSVN's Resolve Conflict
> dialog comes up.
>
> Now if I choose "Prefer repository" the conflicted file is NOT going
> to be the file on repository it will be the local version! Naturally
> with the choose of "Prefer local" this will happen as well.
>
> This can be repeated and e.g I can see with Windows Explorer that
> there are 3 files correctly in the folder before pressing a button to resolve:
> atlassian-bundled-plugins.zip
> atlassian-bundled-plugins.zip.merge-left.r637
> atlassian-bundled-plugins.zip.merge-right.r638
>
> This errorneous behavior won't happen if I choose Resolve later and
> e.g. from the same dialog jump to the conflicted one and choose
> Resolve conflict with 'theirs'!

I think this is a misunderstanding of what "Prefer repository" will do.
It will not (as you noticed) replace the file with the one in the
repository! It will only use the *conflicted part* of the file from the
repository.
So if in a thousand line file only two lines are in conflict, then only
those two lines will be replaced with the same lines from the repo file.
The rest of the file will stay as is, which is the local one.

If you resolve a conflict after the merge using "Resolve conflict with
'theirs'", then that function uses the complete repository file, not
just the conflicted parts.

Stefan


--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3077949

Stefan Küng

unread,
May 9, 2014, 11:40:16 AM5/9/14
to us...@tortoisesvn.tigris.org
On 08.05.2014 12:10, fvp wrote:
> The svn log message shall be saved in Log History even if 'Cancel' is
> clicked.
>
> What I did:
> - open repository browser,
> - navigate to a branch,
> - right-click on the branch directory in the right panel,
> - selected 'Delete',
> - entered a log message,
> - pressed 'Cancel' (by mistake),
> - (again) right-click on the branch directory in the right panel,
> - selected 'Delete',
> - pressed 'Recent messages'.
>
> at this point I did not found the log message entered before pressing
> 'Cancel'.
>
> TSVN 1.8.6.25419 running on Win7 x64 Ultimate.

Created issue #642 for this:
https://code.google.com/p/tortoisesvn/issues/detail?id=642

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3077951

Panu Outinen

unread,
May 10, 2014, 11:05:27 AM5/10/14
to us...@tortoisesvn.tigris.org
Well, if one clicks the Help button in the dialog the online manual states the following:

4.20.6. Handling Conflicts during Merge
...
"If your merge includes binary files, merging of conflicts in those is not possible. You have to choose one complete file. Use Prefer local to select the local version as it was in your working copy prior to the merge, or Prefer repository to select the incoming file from the merge source in the repository. "

And like I said this works as above in version 1.7.13

- Panu

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3078013

Bill Bill

unread,
Jun 19, 2014, 12:47:23 PM6/19/14
to us...@tortoisesvn.tigris.org
I can confirm problem from Panu.
I use TortoiseSVN Client 1.8.7 Build 25475 on Win XP 32bit

I have the same situation:
Trunk and branch contain binary files. Branch contains newer revision of the binary.
When merging the branch to working copy of trunk using "Merge a range of revisions" command the Resolve Conflict dialog appears for binary file.

Choosing "Prefer Repository" there does not result in updating of working copy with repository version , as stated in documentation for binary files. Instead a local file remains.

I think this is a bug.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3083604

Patrick Lavezza

unread,
Aug 7, 2014, 2:24:39 PM8/7/14
to us...@tortoisesvn.tigris.org
Just joined the list. Forgive me if I'm doing anything wrong.

My team got bit by this today. I searched the mailing list but didn't see any further discussion. Is there a plan to bring back the 1.7 behavior or change the documentation?

Summary: Documentation says during a merge selecting Prefer Repository will REPLACE a local binary file with the incoming version. This worked in 1.7.

Thanks
Pat
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3086387

Jerome Lalande

unread,
Nov 26, 2014, 2:22:59 PM11/26/14
to us...@tortoisesvn.tigris.org, Stefan Küng
Hi.

Having the same problem here. For me the problem is mainly with binary files.

I understand, as you explain, that for code files, only the conflicted lines are replaced by repository.

But for binary files, it is not possible to differentiate the conflicted part, so the whole file should be copied, imho.

For example, I just merged a branch containing a few modifications, including a docx file. The mime type of the file is binary (application/octet-stream), but choosing "prefer repository" is not replacing the file, as described by Panu Outinen.

I'm kind of freaked out that this would happen on a large merge, where it would be easy not to notice a missing docx file not modified among hundreds of code files.

Habitually, when merging, I resolve each conflict has it occurs, within the merge dialog.

Could I open a bug on this?

Thanks a lot for your good work!

Using TortoiseSVN 1.8.8, Build 25755 - 64 Bit , 2014/08/10 14:44:06, on Win7 x64

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3091895

Stefan Küng

unread,
Nov 29, 2014, 4:58:01 AM11/29/14
to us...@tortoisesvn.tigris.org
On 26.11.2014 20:21, Jerome Lalande wrote:
> Hi.
>
> Having the same problem here. For me the problem is mainly with binary files.
>
> I understand, as you explain, that for code files, only the conflicted lines are replaced by repository.
>
> But for binary files, it is not possible to differentiate the conflicted part, so the whole file should be copied, imho.
>
> For example, I just merged a branch containing a few modifications, including a docx file. The mime type of the file is binary (application/octet-stream), but choosing "prefer repository" is not replacing the file, as described by Panu Outinen.
>
> I'm kind of freaked out that this would happen on a large merge, where it would be easy not to notice a missing docx file not modified among hundreds of code files.
>
> Habitually, when merging, I resolve each conflict has it occurs, within the merge dialog.
>
> Could I open a bug on this?
>
> Thanks a lot for your good work!

Already fixed:
https://code.google.com/p/tortoisesvn/source/detail?r=26019

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3092026

Jerome Lalande

unread,
Dec 4, 2014, 3:21:43 PM12/4/14
to us...@tortoisesvn.tigris.org
Nice! Thanks a lot!

Jerome

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3092240

Niemann, Hartmut

unread,
Dec 8, 2014, 8:11:47 AM12/8/14
to us...@tortoisesvn.tigris.org
Hello!

As a sequel to this discussion:

I had to merge between to folders inside my working copy.
In such a setup there is nothing like "choose local" and "choose repository".
I was confused, but as far as I can tell I guessed right...

When I merge form /030_branches/my_workingbranch
to /040_trunk inside my working copy, what does "repository" mean? Which is which?

Would "present" and "incoming" or "destination" and "source" be more appropriate words?


Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
Mobility
MO MLT LM EN CCI 1
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Tel.: +49 9131 7-34264
mailto:hartmut...@siemens.com
e-mail: [users-un...@tortoisesvn.tigris.org].

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3092379

Stefan Küng

unread,
Dec 8, 2014, 2:17:58 PM12/8/14
to us...@tortoisesvn.tigris.org
On 08.12.2014 14:11, Niemann, Hartmut wrote:
> Hello!
>
> As a sequel to this discussion:
>
> I had to merge between to folders inside my working copy.
> In such a setup there is nothing like "choose local" and "choose repository".
> I was confused, but as far as I can tell I guessed right...
>
> When I merge form /030_branches/my_workingbranch
> to /040_trunk inside my working copy, what does "repository" mean? Which is which?
>
> Would "present" and "incoming" or "destination" and "source" be more appropriate words?

The terms "local" and "repository" are the same as the svn client uses,
so at least that's an advantage: users are familiar with it (at least
those who use multiple svn clients, and those reading the svn docs).

But I'm open to better terms if there are any. Your suggestions are not
bad, but at least I can't tell which is which. Tell me if I'm right or
wrong:

"present" : working copy file (with possible local mods)
"incoming" : file from the repository, containing the merge changes

"destination" : same as "present"
"source" : same as "incoming"

Also, there's another problem:
if a merge that spans over multiple revisions is done, the first
revisions might not cause a conflict but leave the wc file modified
(i.e., that part of the merge is already done). Now if further revisions
cause a merge conflict, there are local modifications already but
they're not really local but the successful merges. So it gets even more
complicated: "local" then means the already merged parts too.

So, who else has an opinion on what terms we should use?

Stefan



--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3092409

Gavin Lambert

unread,
Jan 13, 2015, 11:27:02 PM1/13/15
to us...@tortoisesvn.tigris.org
On 9/12/2014 08:17, Stefan Küng quoth:
Of those, "local" and "incoming" seem like the most unambiguous to me, assuming that the incoming can sometimes not be the repository.

Having said that, as far as I was aware TSVN (and SVN itself) do not have a feature to merge WC-to-WC -- the incoming must always be a repository revision or revision range, so Hartmut couldn't be doing what he says he's doing. Or have I missed something?

(On a completely unrelated note, it appears that the Date sort order at http://tortoisesvn.tigris.org/ds/postMessage.do?dsForumId=4061 is broken. Not sure who needs to be notified to sort that out.)

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3094186
Reply all
Reply to author
Forward
0 new messages