[issue1785] mq: cannot apply a patch that changes a symlink to a regular file

Jakub Wilk mercurial-bugs at selenic.com
Sat Aug 8 06:19:56 CDT 2009


New submission from Jakub Wilk <ubanus at users.sf.net>:

$ hg --version | head -n 1
Mercurial Distributed SCM (version 1.3.1)

$ hg init

$ printf '[diff]\ngit=true\n' > .hg/hgrc

$ ln -s /dev/null test

$ hg add test

$ hg diff
diff --git a/test b/test
new file mode 120000
--- /dev/null
+++ b/test
@@ -0,0 +1,1 @@
+/dev/null
\ No newline at end of file

$ hg ci -m symlink

$ hg qinit

$ hg qnew buggy.diff

$ hg rm test

$ echo test > test

$ hg add test

$ hg diff
diff --git a/test b/test
old mode 120000
new mode 100644
--- a/test
+++ b/test
@@ -1,1 +1,1 @@
-/dev/null
\ No newline at end of file
+test

$ hg qrefresh

$ hg qpop
patch queue now empty

$ hg qpush
applying buggy.diff
patching file test
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file test.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh buggy.diff

----------
messages: 10298
nosy: jwilk
priority: bug
status: unread
title: mq: cannot apply a patch that changes a symlink to a regular file

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



More information about the Mercurial-devel mailing list