Bug #17502 [Opn]: Text_Diff3 merge conflicts without reason

From: Date: Fri, 18 Jun 2010 11:56:01 +0000
Subject: Bug #17502 [Opn]: Text_Diff3 merge conflicts without reason
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3955@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17502&edit=1 ID: 17502 Updated by: spetzl@gmx.at Reported By: spetzl at gmx dot at Summary: Text_Diff3 merge conflicts without reason Status: Open Type: Bug Package: Text_Diff Operating System: MacOs X, Windows XP Package Version: 1.1.1 PHP Version: 5.2.12 Roadmap Versions: New Comment: if you use this FILE2 instead, it works: ====CHANGED FILE2==== // some merge test aaa bbb ccc ccc ddd eee fff this line added ggg - this line was changed hhh Previous Comments: ------------------------------------------------------------------------ [2010-06-18 10:49:56] stoefln Description: ------------ try to merge the files underneith, you will get an merge conflict. diff3 on my mac system merges this without problems. ====BASE FILE==== // some merge test aaa bbb ccc ccc ddd eee fff ggg hhh ====CHANGED FILE1==== // some merge test aaa bbb-this line is changed ccc ddd eee fff ggg hhh ====CHANGED FILE2==== // some merge test aaa bbb ccc ccc ddd eee fff this line added ggg hhh Test script: --------------- <?php $PATH_typo3conf = '/Applications/MAMP/htdocs/typo3_svn/typo3conf/'; require_once $PATH_typo3conf . 'ext/extbase_kickstarter/lib/pear/' . "Text/Diff/Engine/native.php"; require_once $PATH_typo3conf . 'ext/extbase_kickstarter/lib/pear/' . "Text/Diff3.php"; $base = $PATH_typo3conf .'ext/extbase_kickstarter/testmerge/Box_base.php'; $file2 = $PATH_typo3conf .'ext/extbase_kickstarter/testmerge/Box_generated.php'; $file3 = $PATH_typo3conf .'ext/extbase_kickstarter/testmerge/Box.php'; $merger = new Text_Diff3(file($base), file($file2),file($file3)); echo "<h1>merged</h1><pre>"; print_r($merger); echo "<hr>"; print_r($merger->mergedOutput()); echo "</pre>"; ?> Expected result: ---------------- ====SUCCESSFULLY MERGED FILE==== // some merge test aaa bbb-this line is changed ccc ddd eee fff this line added ggg hhh Actual result: -------------- Array ( [0] => // some merge test [1] => aaa [2] => bbb-this line is changed [3] => ccc [4] => ddd [5] => eee [6] => fff [7] => <<<<<<< [8] => this line added [9] => ======= [10] => ggg [11] => hhh [12] => >>>>>>> [13] => ggg [14] => hhh ) ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17502&edit=1

« previous php.pear.bugs (#3955) next »