Bug #63697 [NEW]: 'Download diff as a patch' doesn't consider trailing spaces changes

From: Date: Wed, 05 Dec 2012 12:17:35 +0000
Subject: Bug #63697 [NEW]: 'Download diff as a patch' doesn't consider trailing spaces changes
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9263@lists.php.net to get a copy of this message
From: shein Operating system: Ubuntu 12.10 64-bit PHP version: Irrelevant Package: Online Doc Editor problem Bug Type: Bug Bug description:'Download diff as a patch' doesn't consider trailing spaces changes Description: ------------ The tool generates incorrect patches when patch contains lines that diff only in trailing spaces, for example, in this patch: https://edit.php.net/index.php? patch=ru/features/cookies.xml&project=PHP original line "когда включена директива <link linkend="ini.track-vars">track_vars</link>." should contain trailing space, while patched line doesn't. As you can see in the patch lines are identical - this makes patch(1) reject these hunks. In Expected/Actual result sections I enabled "End-of-line" mode, so it's easier to spot trailing spaces. Expected result: ---------------- conf@conf ~/Downloads $ cat -E patch-1354692276.patch --- ru/features/cookies.xml$ +++ ru/features/cookies.xml$ @@ -1,6 +1,6 @@$ <?xml version="1.0" encoding="utf-8"?>$ <!-- EN-Revision: 297028 Maintainer: shein Status: ready -->$ -<!-- Reviewed: no -->$ +<!-- Reviewed: yes Maintainer: Alex Cooper -->$ <!-- $Revision: 325754 $ -->$ <chapter xml:id="features.cookies" xmlns="http://docbook.org/ns/docbook">$ <title>Cookies</title>$ @@ -35,7 +35,7 @@$ эту возможность, так как она обычно отключена в целях безопасности.$ В более ранних версиях также определяется массив$ <varname>$HTTP_COOKIE_VARS</varname>, но только$ - когда включена директива <link linkend="ini.track-vars">track_vars</link>. $ + когда включена директива <link linkend="ini.track-vars">track_vars</link>.$ (Эта директива всегда включена начиная с версии PHP 4.0.3.)$ </para>$ Actual result: -------------- conf@conf ~/Downloads $ cat -E patch-1354692276.patch --- ru/features/cookies.xml$ +++ ru/features/cookies.xml$ @@ -1,6 +1,6 @@$ <?xml version="1.0" encoding="utf-8"?>$ <!-- EN-Revision: 297028 Maintainer: shein Status: ready -->$ -<!-- Reviewed: no -->$ +<!-- Reviewed: yes Maintainer: Alex Cooper -->$ <!-- $Revision: 325754 $ -->$ <chapter xml:id="features.cookies" xmlns="http://docbook.org/ns/docbook">$ <title>Cookies</title>$ @@ -35,7 +35,7 @@$ эту возможность, так как она обычно отключена в целях безопасности.$ В более ранних версиях также определяется массив$ <varname>$HTTP_COOKIE_VARS</varname>, но только$ - когда включена директива <link linkend="ini.track-vars">track_vars</link>.$ + когда включена директива <link linkend="ini.track-vars">track_vars</link>.$ (Эта директива всегда включена начиная с версии PHP 4.0.3.)$ </para>$ -- Edit bug report at https://bugs.php.net/bug.php?id=63697&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63697&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63697&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63697&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63697&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63697&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63697&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63697&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63697&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63697&r=support Expected behavior: https://bugs.php.net/fix.php?id=63697&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63697&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63697&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63697&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63697&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63697&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63697&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63697&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63697&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63697&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63697&r=mysqlcfg

« previous php.doc.bugs (#9263) next »