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

login
register
mail settings
Submitter mercurial-bugs@selenic.com
Date April 16, 2016, 6:06 p.m.
Message ID <bug-5207-285@https.bz.mercurial-scm.org/>
Download mbox | patch
Permalink /patch/14683/
State Not Applicable
Headers show

Comments

mercurial-bugs@selenic.com - April 16, 2016, 6:06 p.m.
https://bz.mercurial-scm.org/show_bug.cgi?id=5207

            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
          Assignee: bugzilla@selenic.com
          Reporter: hallik@roztoky.net
                CC: mercurial-devel@selenic.com

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

Patch

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