Version: (using KDE 3.1.2) Installed from: compiled sources Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) OS: Linux (i686) release 2.4.17 If I invoke "kompare / /tmp" it gives me above error.
Subject: Re: New: could not parse diff output On Fri, 18 Jul 2003, M Koller wrote: > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. > > http://bugs.kde.org/show_bug.cgi?id=61391 > Summary: could not parse diff output > Product: kompare > Version: unspecified > Platform: Compiled Sources > OS/Version: Linux > Status: UNCONFIRMED > Severity: normal > Priority: NOR > Component: general > AssignedTo: bugs@kompare.dnsalias.org > ReportedBy: m.koller@surfeu.at > > > Version: (using KDE 3.1.2) > Installed from: compiled sources > Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) > OS: Linux (i686) release 2.4.17 > > If I invoke "kompare / /tmp" it gives me above error. I assume there are no differences between /tmp and /. In that case in some versions there is this error message could not parse diff output. I'll see if this still happens in the latest stable versions and if i cant reproduce i'll close this bug, if i can repoduce i'll fix it of course to say that there are no differences instead of this message. Thanks for reporting but next time please be a little more verbose about the version and tell me what the output of diff -u3 / /tmp is because it is very hard for me to do anything about your problem with so little information. Greetings, Otto
Subject: Re: could not parse diff output OK, I'll be more precise now: I'm using kompare from KDE 3.1.2 compiled from source on a RedHat 7.2 machine. kompare / /tmp is a comparison between two directories (obviously) ;-) There ARE differences, because e.g. / contains /tmp, but /tmp does not contain /tmp and so on. As this is always the case on any system, I'm sure you easily can reproduce this. In the following diff output, you see, that the lines all start with "Only in", which I think is not checked in int KompareModelList::determineDiffFormat The output diff -u3 / /tmp is: [KDE-3.1.2/kdesdk-3.1.2/kompare]# diff -u3 / /tmp Only in /tmp: .ICE-unix Only in /tmp: .X0-lock Only in /tmp: .X11-unix Only in /: .autofsck Only in /: .bash_history Only in /tmp: .fam8ay8b8 Only in /tmp: .famCSAol8 Only in /tmp: .famESO0nV Only in /tmp: .famGjiKHU Only in /tmp: .famGxxyRO Only in /tmp: .famIJHKwQ Only in /tmp: .famLVcAHw Only in /tmp: .famN2zTXY Only in /tmp: .famO64rqp Only in /tmp: .famTev7KL Only in /tmp: .famWf9fBy Only in /tmp: .famXPt7Wv Only in /tmp: .famXZUjR6 Only in /tmp: .famXwJJRg Only in /tmp: .famYrn36j Only in /tmp: .fam_socket Only in /tmp: .famchcJVu Only in /tmp: .famfJlhvc Only in /tmp: .famjKnm2S Only in /tmp: .famptV5tb Only in /tmp: .famqStRty Only in /tmp: .famtdTJah Only in /tmp: .famwPihRy Only in /tmp: .font-unix Only in /: .mcop Only in /: .qt Only in /tmp: .wine-root Only in /tmp: 0349178282 Only in /tmp: 1600775126 Only in /tmp: OSL_PIPE_0_SingleOfficeIPC_-1432748397 Only in /tmp: a.out Only in /tmp: ac3 Only in /tmp: apmd Only in /tmp: as_button_Conf.pnl Only in /tmp: asfinag Only in /tmp: audio Only in /: bin Only in /: boot Only in /: dev Only in /: disc Only in /: etc Only in /: home Only in /: initrd Only in /tmp: jpsock.131_02.14386 Only in /tmp: kde-root Only in /tmp: kio_smb_1843_0_1024755338 Only in /tmp: kio_smb_1849_0_1024755356 Only in /tmp: kio_smb_2384_0_1030691464 Only in /tmp: kio_smb_25660_0_1043575645 Only in /tmp: kio_smb_7556_0_1037389995 Only in /tmp: ksocket-root Only in /tmp: ksocket-test Only in /: lib Only in /tmp: lockmgr Only in /: lost+found Only in /tmp: mcop-root Only in /: misc Only in /: mnt Only in /: nfs Only in /: opt Only in /tmp: pix.png Only in /: proc Only in /tmp: resLisa-root Only in /: root Only in /: sbin Only in /: tmp Only in /tmp: txt.c Only in /tmp: txt.c.1 Only in /: usr Only in /: var Only in /tmp: x.moc > > > > If I invoke "kompare / /tmp" it gives me above error. > > I assume there are no differences between /tmp and /. In that case in some > versions there is this error message could not parse diff output. I'll see > if this still happens in the latest stable versions and if i cant > reproduce i'll close this bug, if i can repoduce i'll fix it of course to > say that there are no differences instead of this message. Thanks for > reporting but next time please be a little more verbose about the version > and tell me what the output of diff -u3 / /tmp is because it is very hard > for me to do anything about your problem with so little information. > > Greetings, > Otto - -- Best regards/Sch
Subject: Re: could not parse diff output On Sat, 19 Jul 2003, M Koller wrote: What i meant with no differences is that there no 2 files with the same name and or that there are no differences between 2 files with the same name. determineFormat does what it should do, it does not detect the format the diff output is in. The problem is the interpretation of the return value (-2) from parseDiffOutput: anything other than 0 is interpreted as problems encountered during parsing. There is no easy solution here since i cant add new strings to the kde 3.1.x branch. For the -2 case i would have added a string like "Unable to determine the format of the diff output." Which means the parser can't find any hunks in the diff output to determine the format so a better string might be: "Unable to find any differences between the files or directories". This string is not going to appear in kompare before 3.2 though :( If you want to see differences when comparing 2 directories between all files (and files in only 1 directory should be interpreted as empty in the other directory) then use the -N command line option in diff. You could use this command then: diff -u3 -N / /tmp | kompare - Unfortunately this cant be achieved with kompare in the 3.1.x branch because again of the inability to add new strings and new features. If you want this functionality i'll see if i can add this to HEAD and it will then first appear in 3.2. In that case i'll probably add the possibility to add additional options to the diff process from the commandline like this: kompare -O "-N -t -x PATTERN" -c / /tmp The diff options configuration page wont let you do this, i will add a custom options KLineEdit in which you can add all the additional options you want before 3.2. Hope this helps, Otto Bruggeman
Sorry. My bad, i forgot about this -O option, i'll implement it asap and make an independent release after 3.2 is out. It will also be a preview to what the KDE 3.3 or KDE 4.0 version will contain.
I get the "Could not parse diff output" with the folowing formats: 'Ed Normal RCS This is CVS HEAD
Yes known problem Amilcar, they are not fully implemented, it will take me some more time to fix this. Ed is a bitch to parse, it starts from the end and then works it way to the beginning and is only usefull when you have both files, it does not show what it cuts out in a delete. Pretty hard to show when opening it as diff output not generated by kompare. But if used when comparing files i could use the blend stuff i implemented to show what it cuts out. RCS has the same issue with deletes, it wont show what it deletes. If you change 1 line it will show 2 entries, a delete and an add with only text in the add. This would make it a change and thus would make it interesting for inloine differences but that will break because there is no info from the original. Lots of problems so after the parser rewrite i still havent found a way to properly address those issues. Hopefully i'll be able to get to it before 3.2 is released and make something usefull out of it.
Subject: kdesdk/kompare/komparepart CVS commit by bruggie: I dont think i can fix Ed and RCS in the near future, disabling them for now. Maybe removing is even better but i'll think about it some more. I'll work on Normal some more, i almost have it working locally, hopefully i'll find some more time to fix the remaining problems. CCMAIL: 61391@bugs.kde.org M +2 -0 diffprefs.cpp 1.20 --- kdesdk/kompare/komparepart/diffprefs.cpp #1.19:1.20 @@ -256,6 +256,8 @@ void DiffPrefs::addFormatTab() radioButton = new QRadioButton( i18n( "Context" ), m_modeButtonGroup ); radioButton = new QRadioButton( i18n( "Ed" ), m_modeButtonGroup ); + radioButton->setEnabled( false ); radioButton = new QRadioButton( i18n( "Normal" ), m_modeButtonGroup ); radioButton = new QRadioButton( i18n( "RCS" ), m_modeButtonGroup ); + radioButton->setEnabled( false ); radioButton = new QRadioButton( i18n( "Unified" ), m_modeButtonGroup );
This is gonna be a little spammy... I'm reassigning everything that's currently assigned to bruggie (who's been the default assignee for bugs since time began) to the new list address. Bruggie: if you're working on one or more of these atm, please snatch 'em back.. Everyone, esp. Joshua and Bruggie: if this genrates 33 mails, my sincere apologies..
I see a commit here, but it's not fixing the reported problem. IMHO this should be marked as wishlist. What do you think?
I'm having the same problem not matter what two files I use. Here is the diff output from one such example. Could this be a problem similar to http://bugs.kde.org/show_bug.cgi?id=131717 diff ~/meqharvard_www/wp-content/plugins/mequoda_registration/order_update_process.php ~/Desktop/mequoda-old/wp-content/plugins/mequoda_registrtion/order_update_process-2008-07-09.php 24c24 < --- > 26c26 < --- > 29,31c29,34 < < $post_values = stripslashes_deep($_POST ); < --- > > $post_values = array(); > foreach($_POST as $key => $value) { > $post_values[$key] = get_magic_quotes_gpc() ? stripslashes($value) : $value; > } > 39c42 < --- > 41c44 < --- > 49c52 < --- > 51c54 < $address = strip_tags($_POST['address']); --- > $address = get_magic_quotes_gpc() ? strip_tags($_POST['address']) : strip_tags(addslashes($_POST['address'])); 54c57 < $address2 = strip_tags($_POST['address2']); --- > $address2 = get_magic_quotes_gpc() ? strip_tags($_POST['address2']) : strip_tags(addslashes($_POST['address2'])); 57c60 < $city = strip_tags($_POST['city']); --- > $city = get_magic_quotes_gpc() ? strip_tags($_POST['city']) : strip_tags(addslashes($_POST['city'])); 60c63 < $state = strip_tags($_POST['state']); --- > $state = get_magic_quotes_gpc() ? strip_tags($_POST['state']) : strip_tags(addslashes($_POST['state'])); 63c66 < $zip_code = strip_tags($_POST['zip_code']); --- > $zip_code = get_magic_quotes_gpc() ? strip_tags($_POST['zip_code']) : strip_tags(addslashes($_POST['zip_code'])); 66c69 < $country = strip_tags($_POST['country']); --- > $country = get_magic_quotes_gpc() ? strip_tags($_POST['country']) : strip_tags(addslashes($_POST['country'])); 69c72 < $phone = strip_tags($_POST['phone']); --- > $phone = get_magic_quotes_gpc() ? strip_tags($_POST['phone']) : strip_tags(addslashes($_POST['phone'])); 71c74 < --- > 81c84 < --- > 88c91 < --- > 98c101 < --- > 108c111 < --- > 113c116 < --- > 118c121 < --- > 123c126 < --- > 128,132c131,138 < < < // Should happen no matter what payment method < $price = strip_tags($_POST['price']); < --- > > if( isset($_POST['pay_method']) ) { > if( $_POST['pay_method'] == "3" ) { > // bill-me only order > $price = get_magic_quotes_gpc() ? strip_tags($_POST['price']) : strip_tags(mysql_real_escape_string($_POST['price'])); > } > } > 137a144 > $price = get_magic_quotes_gpc() ? strip_tags($_POST['price']) : strip_tags(mysql_real_escape_string($_POST['price'])); 140,144c147,151 < $card_type = strip_tags($_POST['card_type']); < $card_number = strip_tags($_POST['card_number']); < $exp_month = strip_tags($_POST['exp_month']); < $exp_year = strip_tags($_POST['exp_year']); < $cvv = strip_tags($_POST['cvv']); --- > $card_type = get_magic_quotes_gpc() ? strip_tags($_POST['card_type']) : strip_tags(mysql_real_escape_string($_POST['card_type'])); > $card_number = get_magic_quotes_gpc() ? strip_tags($_POST['card_number']) : strip_tags(mysql_real_escape_string($_POST['card_number'])); > $exp_month = get_magic_quotes_gpc() ? strip_tags($_POST['exp_month']) : strip_tags(mysql_real_escape_string($_POST['exp_month'])); > $exp_year = get_magic_quotes_gpc() ? strip_tags($_POST['exp_year']) : strip_tags(mysql_real_escape_string($_POST['exp_year'])); > $cvv = get_magic_quotes_gpc() ? strip_tags($_POST['cvv']) : strip_tags(mysql_real_escape_string($_POST['cvv'])); 146c153 < --- > 151c158 < --- > 157c164,167 < $card_number_x = str_repeat('X', strlen($card_number) - 4) . substr($card_number, -4); --- > $card_number_x = substr($card_number, -4, 4); > for($x = 0; $x < strlen($card_number) - 4; $x++) { > $card_number_x = "X".$card_number_x; > } 164c174 < --- > 169,171c179,183 < < if ( $exp_month != '' && $exp_year != '' && mktime(0, 0, 0, $exp_month, date('d'), $exp_year) < mktime() ) { < $errors[] = '<strong>ERROR</strong>: Credit card has expired.'; --- > > if ( $exp_month != '' && $exp_year != '' ) { > if ( mktime(0, 0, 0, $exp_month, date('d'), $exp_year) < mktime() ) { > $errors[] = '<strong>ERROR</strong>: Credit card has expired.'; > } 173c185 < --- > 219c231 < --- > 223c235 < --- > 251c263 < --- > 287c299 < --- > 292c304 < --- > 299,301c311,313 < $product_id = strip_tags($_POST['product_id']); < $product_name = strip_tags($_POST['product_name']); < $file_name = strip_tags($_POST['file_name']); --- > $product_id = get_magic_quotes_gpc() ? strip_tags($_POST['product_id']) : strip_tags(mysql_real_escape_string($_POST['product_id'])); > $product_name = get_magic_quotes_gpc() ? strip_tags($_POST['product_name']) : strip_tags(mysql_real_escape_string($_POST['product_name'])); > $file_name = get_magic_quotes_gpc() ? strip_tags($_POST['file_name']) : strip_tags(mysql_real_escape_string($_POST['file_name'])); 303c315 < $file_name2 = strip_tags($_POST['file_name2']); --- > $file_name2 = get_magic_quotes_gpc() ? strip_tags($_POST['file_name2']) : strip_tags(mysql_real_escape_string($_POST['file_name2'])); 305c317 < --- > 308c320 < --- > 329,331c341 < // We need this for the fulfillment center < $_SESSION['post_values']['order_type'] = $order_type; < --- > 333c343 < --- > 347c357 < --- > 351,353c361 < // We need this to send to the fulfillment center < $_SESSION['post_values']['invoice_number'] = $invoice_number; < --- > 359c367 < --- > 363c371 < --- > 369c377 < "&EXPDATE=".$exp_month.$exp_year. --- > "&EXPDATE=".$exp_month.$exp_year. 376c384 < "&STATE=".$state. --- > "&STATE=".$state. 384c392 < --- > 389c397 < --- > 392,395c400,403 < "ACK" => "Success", < "TRANSACTIONID" => "Test", < "AVSCODE" => "Test", < "CVV2MATCH" => "Test", --- > "ACK" => "Success", > "TRANSACTIONID" => "Test", > "AVSCODE" => "Test", > "CVV2MATCH" => "Test", 402c410 < --- > 404c412 < --- > 415c423 < --- > 477c485 < --- > 490c498 < --- >
I don't understand from the comments what the problem is anymore. Please attach some files that show this problem and if you think it is too confidential information to attach to this bug report then mail them to me and I'll look into it.
SVN commit 929702 by bruggie: CCBUG: 61391 Add even more "what's this" strings to the diff options. Still a few pages left to do. Finally fully remove the options for RCS and Ed, they will never be implemented by me. M +11 -6 diffpage.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=929702
Problem seems to be solved with KDE 4.3