Patchwork [Bug,5207] New: mq: qpush doesn't honor diff.noprefix

mail settings
Date April 16, 2016, 6:06 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/14683/
State Not Applicable
Headers show

Comments - April 16, 2016, 6:06 p.m.

            Bug ID: 5207
           Summary: mq: qpush doesn't honor diff.noprefix
           Product: Mercurial
           Version: 3.7.3
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: mq

When diff.noprefix is True qnew and qrefresh create patches without [a,b]/
prefix (which is correct) but qpush can't apply these patches. Example:

$> hg init
$> mkdir -p r/s
$> echo original > r/s/t.txt
$> hg commit -A -m orig
adding r/s/t.txt
$> echo change > r/s/t.txt 
$> hg --config diff.noprefix=True qnew p1.diff
$> cat .hg/patches/p1.diff 
# HG changeset patch
# Parent  36ef0c04be112b0212bd38af1e641a5c5be00206

$> hg qpop 
popping p1.diff
patch queue now empty
$> hg qpush
applying p1.diff
unable to find 's/t.txt' for patching
1 out of 1 hunks FAILED -- saving rejects to file s/t.txt.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh p1.diff


diff --git r/s/t.txt r/s/t.txt
--- r/s/t.txt
+++ r/s/t.txt
@@ -1,1 +1,1 @@