Issue1388

Title test-mq and test-mq-qdelete expect all patch implementations use the same error message
Priority bug Status resolved
Superseder Nosy List akitada, kiilerix, pmezard, tonfa
Assigned To Topics patch

Created on 2008-11-16.07:03:24 by akitada, last changed 2010-10-10.16:03:24 by pmezard.

Files
File name Uploaded Type Edit Remove
issue1388.diff akitada, 2008-11-16.07:24:24 application/octet-stream
issue1388_2.diff akitada, 2008-11-16.12:33:19 application/octet-stream
Messages
msg13946 (view) Author: pmezard Date: 2010-10-10.16:03:24
OK, two years later, the external patcher fallback has been removed
(http://hg.intevation.org/mercurial/crew/rev/1b4e3152da13).

Sorry about this.
msg12095 (view) Author: tonfa Date: 2010-03-19.18:35:56
I'd be in favor to deprecating the external patcher, or at least always try 
the internalpatcher first.
msg11769 (view) Author: pmezard Date: 2010-02-16.10:54:12
Unfortunately yes.

For regular patches, I think it is useless, our works correctly by now. We
cannot rule out people use it with completely different tools but we should
probably poll the mailing list.
msg11768 (view) Author: tonfa Date: 2010-02-16.10:27:32
Do we still use the external patcher?
msg7910 (view) Author: akitada Date: 2008-11-17.16:29:59
I agree. anyway this is a very trivial 
problem.
Not a worth to push it this very moment.
will take this a closer look after the 
release
msg7908 (view) Author: pmezard Date: 2008-11-17.08:39:29
The fallback disabling sounds good to me, but I think we should not push this a
couple of days before the release. I am tempted to push the tests fixing patch
instead, then push the other one after the release.
msg7907 (view) Author: akitada Date: 2008-11-16.12:33:19
attaching another patch. This one disables the fallback to externalpatch when
NoHunks occured.
msg7906 (view) Author: akitada Date: 2008-11-16.07:24:24
Attached patch fixes this problem by using the return code of hg command,
instead of diff's output. I think it's better to change hg mq commands not to
output patch's error messages.
msg7905 (view) Author: akitada Date: 2008-11-16.07:03:22
It seems test-mq and test-mq-delete assume all diff implementations use the same
error message, but that's not correct.

$ echo a > a; echo b > b; patch a < b
patch: **** Only garbage was found in the patch input.
mbp:forcepush akira$ patch -v
patch 2.5.8
Copyright (C) 1988 Larry Wall
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert


$ echo a > a; echo b > b; patch a < b
Hmm...  I can't seem to find a patch in there anywhere.
$ patch -v
Patch version 2.1

And here are how that tests fail.

$ gmake tests
cd tests && python run-tests.py 
............................s...................ssssss.s....s...sssssssss...........................................................s...........ssss...........................................
ERROR: test-mq output changed
--- Expected output 
+++ Test output 
@@ -486,9 +486,7 @@
 abort: local changes found, refresh first
 % apply force, should not discard changes with empty patch
 applying empty
-patch: **** Only garbage was found in the patch input.
-patch failed, unable to continue (try -v)
-patch empty is empty
+Hmm...  I can't seem to find a patch in there anywhere.
 Now at: empty
 diff -r bf5fc3f07a0a hello.txt
 --- a/hello.txt
!........
ERROR: test-mq-qdelete output changed
--- Expected output 
+++ Test output 
@@ -30,6 +30,7 @@
 Now at: b
 abort: unknown revision 'c'!
 applying c
+Hmm...  I can't seem to find a patch in there anywhere.
 Now at: c
 c
 3 imported patch c
!.................s.......................................................................................
Skipped test-casefolding: missing feature: case insensitive file system
Skipped test-convert-baz: missing feature: GNU Arch baz client
Skipped test-convert-bzr: missing feature: Canonical's Bazaar client
Skipped test-convert-bzr-directories: missing feature: Canonical's Bazaar client
Skipped test-convert-bzr-ghosts: missing feature: Canonical's Bazaar client
Skipped test-convert-bzr-merges: missing feature: Canonical's Bazaar client
Skipped test-convert-bzr-treeroot: missing feature: Canonical's Bazaar client
Skipped test-convert-cvs: missing feature: cvsps utility
Skipped test-convert-darcs: not executable
Skipped test-convert-git: missing feature: git command line client
Skipped test-convert-hg-svn: missing feature: subversion python bindings
Skipped test-convert-mtn: missing feature: monotone client (> 0.31)
Skipped test-convert-svn-branches: missing feature: subversion python bindings
Skipped test-convert-svn-move: missing feature: subversion python bindings
Skipped test-convert-svn-sink: missing feature: subversion python bindings
Skipped test-convert-svn-source: missing feature: subversion python bindings
Skipped test-convert-svn-startrev: missing feature: subversion python bindings
Skipped test-convert-svn-tags: missing feature: subversion python bindings
Skipped test-convert-tla: missing feature: GNU Arch tla client
Skipped test-highlight: missing feature: Pygments source highlighting library
Skipped test-imerge: not executable
Skipped test-inotify: missing feature: inotify extension support
Skipped test-inotify-issue1208: missing feature: inotify extension support
Skipped test-inotify-issue1371: missing feature: inotify extension support
Skipped test-inotify-lookup: missing feature: inotify extension support
Skipped test-no-symlinks: system supports symbolic links
Failed test-mq: output changed
Failed test-mq-qdelete: output changed
# Ran 308 tests, 26 skipped, 2 failed.
gmake: *** [tests] Error 1
History
Date User Action Args
2010-10-10 16:03:24pmezardsetstatus: chatting -> resolved
nosy: tonfa, pmezard, kiilerix, akitada
messages: + msg13946
2010-09-27 13:14:44kiilerixsetnosy: + kiilerix
2010-03-19 18:35:56tonfasetnosy: tonfa, pmezard, akitada
messages: + msg12095
2010-02-16 10:54:12pmezardsetnosy: tonfa, pmezard, akitada
messages: + msg11769
2010-02-16 10:27:32tonfasetnosy: + tonfa
messages: + msg11768
2008-11-17 16:30:00akitadasetnosy: pmezard, akitada
messages: + msg7910
2008-11-17 08:39:29pmezardsetnosy: + pmezard
messages: + msg7908
2008-11-16 23:17:42tonfasettopic: + patch
2008-11-16 12:33:19akitadasetfiles: + issue1388_2.diff
messages: + msg7907
2008-11-16 10:53:37akitadasettitle: test-mq and test-mq-qdelete expect all diff implementations use the same error message -> test-mq and test-mq-qdelete expect all patch implementations use the same error message
2008-11-16 07:24:26akitadasetfiles: + issue1388.diff
status: unread -> chatting
messages: + msg7906
2008-11-16 07:03:24akitadacreate