Match Similar text prblem...?

Open discussion about WinMerge.

Match Similar text prblem...?

Postby vader4242 » Sat Nov 21, 2009 2:17 am

Hi all,

Long time lurker, fist time poster here. I have been using WinMerge for some time now for identifying code changes I make as a developer, and up to now it has been flawless. Usually, the changes are made to at few consecutive lines at a time, and WinMerge has no problem identifying and lining up the modified code vs the additional lines. That does not seem to work with larger difference blocks (as I found out today, much to my chargin). To be more specific, if I start with the following text structure
This is similar text line #1 ksldjghldkjfhgldkjfghlsdkfjghlsdkjsdfg8s7dfgosd89fghdjfghlsdifuglsdiufhglsdiufhg
This is similar text line #2 sakljhflkajshdfoeirutyoweiruhlaskerutywpeiruytlsksjyrtpwi48y5pwierutslekrutywliere8y
This is similar text line #3 kjasleiryu[rtu]5607093247pwn 8ewp48762p938456bap9w836p9
This is similar text line #4 skjdfowe874w65oorutlsaei4865wpa9w834pq298365pq923865bp vq29365bvp 29386vb p293865
This is similar text line #5 lksdurtypqi38465fn- 293864bc -92386bv [83[98356b294856b934856p 9283692

and make minor modifications to each line, and add a couple of new lines inbetween,
This is similar text line #1 ksldjghldkjfhgldddkjfghlsdkfjghlsdkjsdfg8s7dfgosd89fghdjfghlsdifuglsdiufhglsdiufhg
new line a
new line b
This is similar text line #2 sakljhflkajshdfddoeirutyoweiruhlaskerutywpeiruytlsksjyrtpwi48y5pwierutslekrutywliere8y
new line c
new line d
This is similar text line #3 kjasleiryu[rtu]560709324dd7pwn 8ewp48762p938456bap9w836p9
new line e
new line f
This is similar text line #4 skjdfowe874w65oorutlsddaei4865wpa9w834pq298365pq923865bp vq29365bvp 29386vb p293865
new line g
new line h
This is similar text line #5 lksdurtypqi3dd8465fn- 293864bc -92386bv [83[98356b294856b934856p 9283692

the compare turns out the expected results: the "This is similar text" lines were lined up correctly (and the different chracters identified), and the "new line" lines were reported as, well, new lines. Now, if enough new lines are added inbetween the similar lines,
This is similar text line #1 ksldjghldkjfhgldddkjfghlsdkfjghlsdkjsdfg8s7dfgosd89fghdjfghlsdifuglsdiufhglsdiufhg
new line a
new line b
new line i
new line j
new line k
This is similar text line #2 sakljhflkajshdfddoeirutyoweiruhlaskerutywpeiruytlsksjyrtpwi48y5pwierutslekrutywliere8y
new line c
new line d
new line l
new line m
new line n
This is similar text line #3 kjasleiryu[rtu]560709324dd7pwn 8ewp48762p938456bap9w836p9
new line e
new line f
new line o
new line p
new line q
This is similar text line #4 skjdfowe874w65oorutlsddaei4865wpa9w834pq298365pq923865bp vq29365bvp 29386vb p293865
new line g
new line h
new line r
new line s
new line t
This is similar text line #5 lksdurtypqi3dd8465fn- 293864bc -92386bv [83[98356b294856b934856p 9283692

things are not quite as pretty. It is as if the "match similar lines" option was unchecked. All of the "similar line" lines are bunched up at the top, with the remaining lines reported as new lines, including the other "similar lines". It is not even making an attempt at matching up the similar lines, but is comparing line by line. Now, if some blank lines are introduced into each file such that the difference blocks are broken into smaller pieces
This is similar text line #1 ksldjghldkjfhgldkjfghlsdkfjghlsdkjsdfg8s7dfgosd89fghdjfghlsdifuglsdiufhglsdiufhg

This is similar text line #2 sakljhflkajshdfoeirutyoweiruhlaskerutywpeiruytlsksjyrtpwi48y5pwierutslekrutywliere8y

This is similar text line #3 kjasleiryu[rtu]5607093247pwn 8ewp48762p938456bap9w836p9

This is similar text line #4 skjdfowe874w65oorutlsaei4865wpa9w834pq298365pq923865bp vq29365bvp 29386vb p293865

This is similar text line #5 lksdurtypqi38465fn- 293864bc -92386bv [83[98356b294856b934856p 9283692

vs
This is similar text line #1 ksldjghldkjfhgldddkjfghlsdkfjghlsdkjsdfg8s7dfgosd89fghdjfghlsdifuglsdiufhglsdiufhg
new line a
new line b
new line i
new line j
new line k

This is similar text line #2 sakljhflkajshdfddoeirutyoweiruhlaskerutywpeiruytlsksjyrtpwi48y5pwierutslekrutywliere8y
new line c
new line d
new line l
new line m
new line n

This is similar text line #3 kjasleiryu[rtu]560709324dd7pwn 8ewp48762p938456bap9w836p9
new line e
new line f
new line o
new line p
new line q

This is similar text line #4 skjdfowe874w65oorutlsddaei4865wpa9w834pq298365pq923865bp vq29365bvp 29386vb p293865
new line g
new line h
new line r
new line s
new line t

This is similar text line #5 lksdurtypqi3dd8465fn- 293864bc -92386bv [83[98356b294856b934856p 9283692

and again everything is perfectly compared. Note that all I added to the last two text files were blank lines in the same relative place, nothing else. Nor did I change options. Is there some limitation I am bumping up against? Is there a setting I am missing to increase said limit? Please help!!!
vader4242
 
Posts: 1
Joined: Sat Nov 21, 2009 1:59 am

Return to Open Discussion

Who is online

Users browsing this forum: Bing [Bot] and 15 guests