1. Please compare these two text files aaa.txt and bbb.txt in compare tool (in this order) with enabled "Ignore repeated spaces" and disabled "Ignore frequent lines" options:
Code: Select all
function get_gettimeofday() {
return gettimeofday();
}
class MyClass {
// some comment
// some other comment
var $files = array();
var $var1;
var $var2;
//TODO go sleep
function process($filename){
do_something(FALSE, $filename);
return result($filename);
}
usage() {
echo "usage: $0 COMMAND"
echo
echo "Manage php source tarball lifecycle."
echo
echo "Commands:"
echo " extract extract php source tarball into directory $dir if not already done."
echo " delete delete extracted php source located into $dir if not already done."
echo
}
case "$1" in
extract)
mkdir -p "$dir"
if [ ! -f "$dir/.docker-extracted" ]; then
tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
touch "$dir/.docker-extracted"
fi
;;
delete)
rm -rf "$dir"
;;
*)
usage
exit 1
;;
esac
Code: Select all
function get_gettimeofday() {
return gettimeofday();
}
function get_true() {
return FALSE;
}
if (!function_exists('test_function')) {
function test_function($s) {
// yohoh
// gfhggggg
//dfgdfgdfgdfg
}
}
class MyClass {
// some comment
// some other comment
var $files = array();
var $var1;
var $var2;
// ini="/usr/local/etc/php/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
//TODO go sleep
function process($filename){
do_something(FALSE, $filename);
return result($filename);
}
usage() {
echo "usage: $0 COMMAND"
echo
echo "Manage php source tarball lifecycle."
echo
echo "Commands:"
echo " extract extract php source tarball into directory $dir if not already done."
echo " delete delete extracted php source located into $dir if not already done."
echo
}
case "$1" in
extract)
mkdir -p "$dir"
if [ ! -f "$dir/.docker-extracted" ]; then
tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
touch "$dir/.docker-extracted"
fi
;;
delete)
rm -rf "$dir"
;;
*)
usage
exit 1
;;
esac
2. Simply swap panels (from context menu) and press Compare button! Now comparer have synced proper lines!
3. Swap panels back and press Compare button to get bad sync again, and enable "Ignore frequent lines" option or disable "Ignore repeated spaces" option to set them into same state (enabled or disabled) and press Compare again. Comparer have synced proper lines again!
So it is quite strange why TC syncs these files (which provide only a sample of real situation of course) in first case.