nasty bug when applying patches
Patrick Mézard
patrick at mezard.eu
Thu Apr 5 13:53:04 UTC 2012
Le 05/04/12 15:16, Dominik Psenner a écrit :
>>> Could this bug be a duplicate of 1175?
>>
>> No this is a brand new bug:
>>
>> http://mercurial.selenic.com/bts/issue3357
>>
>> I am not sure which part is misbehaving yet. Thank you for reporting it.
>
> You don't have to thank me for that. I had to apply around 450 hunks across
> 50 files or so manually. That took me about 3 hours so that I found it
> rather important to be reported. :-)
>
> Anyway, I tried an older 1.7.5 mercurial and the same thing happened there.
> It feels strange that noone ran into this bug for so long?
It only happens when applying a patch containing a git rename from a file without a space to a file with a space. I suppose most people either create files directly with spaces, or move away from spaces, not the opposite.
> So far I observed that given the patch:
> # HG changeset patch
> # User test
> # Date 0 0
> # Node ID d9adadb0607aa6f297ed276355f02bbbac150078
> # Parent b223f2abdff27a2eeedefd683322f9533a0186c6
> 1
>
> diff --git a/d/f b/d 2/f
> rename from d/f
> rename to d 2/f
> --- a/d/f
> +++ b/d 2/f
FWIW, if you have to redo this, edit the patch and end the line above with a TAB.
> @@ -1,1 +1,2 @@
> f
> +f
Here is a patch:
http://selenic.com/pipermail/mercurial-devel/2012-April/039002.html
--
Patrick Mézard
More information about the Mercurial-devel
mailing list