Confused by Tortoise Merge Dialog for Simple Example

59 views
Skip to first unread message

Neil Russell

unread,
Oct 24, 2014, 5:19:02 PM10/24/14
to us...@tortoisesvn.tigris.org
I was just trying to test a simple branch/merge example for a quick training demo I was putting together and I am a bit confused by the TortoiseMerge dialog.

I created a simple repository with one file called file1.txt containing one line with the text:
"Change 1"

I then created a branch.

Edited trunk and added a new line to file1.txt with the text "Change 2" and committed it.

Edited the branch I just created and added a new line to file2.txt with the text "Change 3" and committed it.

I then did an automatic merge from trunk into the branch and as expected got a conflict dialog. What I don't understand is why Change 1 is listed twice in both the Theirs and Mine windows? I kind of expected to see Change 1 once and the conflict to highlight just change 2 and change 3 lines and be able to select User Their then Mine and end up with:
Change 1
Change 2
Change 3

Instead if I use that option I'll get
Change 1
Change 1
Change 2
Change 1
Change 3

I have attached a screenshot which hopefully makes it clearer.
Can anyone explain the merge dialog to me, I thought I understood it.

Thanks,
Neil

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

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

Ben Fritz

unread,
Oct 27, 2014, 1:52:30 PM10/27/14
to us...@tortoisesvn.tigris.org, nrus...@apeg.bc.ca


On Fri, Oct 24, 2014 at 4:17 PM, Neil Russell <nrus...@apeg.bc.ca> wrote:
>
> I have attached a screenshot which hopefully makes it clearer.
> Can anyone explain the merge dialog to me, I thought I understood it.
>

I don't see a screenshot. Can you try again?

Neil Russell

unread,
Oct 27, 2014, 5:16:37 PM10/27/14
to us...@tortoisesvn.tigris.org
Ok, figured out what happened, if you get the captcha wrong you need to select the file again. Anyways, I have attached the screenshot again.

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

Alexandre Guillemé

unread,
Oct 28, 2014, 5:10:24 AM10/28/14
to us...@tortoisesvn.tigris.org
Maybe you didn'y have end of line after "Change 1"
so when you added "Change 2", you also added a "CR/LF" after Change 1, so the line is different

Stefan Küng

unread,
Oct 28, 2014, 2:38:24 PM10/28/14
to us...@tortoisesvn.tigris.org
On 28.10.2014 10:03, Alexandre Guillemé wrote:
> Maybe you didn'y have end of line after "Change 1"
> so when you added "Change 2", you also added a "CR/LF" after Change 1,
> so the line is different

Or: no EOL at the end of the last line.
TortoiseSVN is using the diffing engine of the svn library. And that lib
does the diff using blocks of lines. So if the last line does not have
an EOL, it is not considered a complete line and therefore treated as
part of the previous block.

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=3090548

Neil Russell

unread,
Oct 28, 2014, 4:21:00 PM10/28/14
to us...@tortoisesvn.tigris.org
You're right I didn't have a newline at the end of my file. I had done the merge with ignore eol and whitespace set thinking that would take care of it.

Anyways I retried the merge with a couple of newlines at the end of the file and the merge dialog makes more sense.

It's still a bit strange since I end up with a newline in the middle of the merged lines but it's good enough for me.

Thanks,
Neil

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