nasty bug when applying patches

Dominik Psenner dpsenner at gmail.com
Thu Apr 5 05:09:08 CDT 2012


Hi devs,

I'm unsure whether this is a duplicate of
http://mercurial.selenic.com/bts/issue1175 or a new issue. Therefore I ask
here if I should file a new bug or not.

$cat folder1/file.txt
Line1
Line2
Line3
$hg add folder1/file.txt
$hg commit
$mkdir folder2 with space
$mkdir folder2
$hg rename folder1/file.txt folder2 with space/file.txt
# modify file "folder2 with space/file.txt" to look like:
$cat folder1/file.txt
Line1
Line2 modified
Line3
$hg commit

If I do now qimport the second commit and then qpop, qpush would fail. It
renames the file correctly, but fails applying the modifications as long as
there is the folder "folder2" together with "folder2 with space". For
completeness, the patch diff looks like:

# HG changeset patch
# User DominikP
# Date 1333617703 -7200
# Node ID 260b696ea715c19436d678f5586582c4d8d7c06f
# Parent 8a28061640c6dc7d3c4ee6d90c5bc328a1761797
commit2

diff --git a/folder1/file.txt b/folder2 with space/file.txt
rename from folder1/file.txt
rename to folder2 with space/file.txt
--- a/folder1/file.txt
+++ b/folder2 with space/file.txt
@@ -1,3 +1,3 @@
 line1
-line2
-line3
\ No newline at end of file
+line2 modified
+line3

Could this bug be a duplicate of 1175?

Cheers,
Dominik



More information about the Mercurial-devel mailing list