[issue950] qpush gets very confused given strange patch file

John Levon mercurial-bugs at selenic.com
Mon Jan 28 20:28:25 CST 2008


New submission from John Levon <levon at movementarian.org>:

The problem shown here has broken the build of our Mercurial gate
with hg 0.9.5 (sorry, I haven't tested a later version, but the
below script should make it easy for you to test).

Note that the strange git diff generated below exists due to some
previous problem in patch generation: if a diff existed, and at some
point had no changes, then you get a patch file like the one shown.

#!/bin/bash -x

rm -rf mt
mkdir mt
hg init mt
cd mt
echo "foo\nbar\nbar\nbar\n" >a
touch c
hg add a c
hg commit -m 'add a and c'
hg qinit -c
hg qnew foo
echo "baz\nbaz\n" >>a
hg qrefresh
hg qpop -a
echo "diff --git a/c b/c" >>.hg/patches/foo
hg qpush -av



This script gives with 0.9.5 (a regression):

applying foo
patching file a
patching file a
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file a.rej
1 out of 1 hunk ignored -- saving rejects to file a.rej
patch command failed: exited with status 1
a
c
patch failed, rejects left in working dir
Errors during apply, please fix and refresh foo

----------
messages: 5010
nosy: movement
priority: bug
status: unread
title: qpush gets very confused given strange patch file

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue950>
____________________________________________________



More information about the Mercurial-devel mailing list