$ hg init $ echo a > a $ hg ci -Am0 adding a $ hg mv a b $ echo b >> b Comment out this line to make this test succeed: $ python -c 'open("b", "a").write("\0")' $ hg ci -m1 $ hg export -g tip > b.patch Try to apply our patch: $ hg co 0 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg import --no-commit b.patch applying b.patch file b already exists 1 out of 1 hunks FAILED -- saving rejects to file b.rej abort: patch failed to apply [255] $ hg st A b R a ? b.patch ? b.rej
Fixed by http://hg.intevation.org/mercurial/crew/rev/77600d697d0e Patrick Mezard <pmezard@gmail.com> patch: fix rename text to binary file (issue2400)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:12 EDT --- This bug was previously known as _bug_ 2400 at http://mercurial.selenic.com/bts/issue2400