a question about file renaming
Manlio Perillo
manlio_perillo at libero.it
Thu Jul 10 05:58:41 CDT 2008
Christian Boos ha scritto:
> Peter Arrenbrecht wrote:
>> On Thu, Jul 10, 2008 at 10:41 AM, Manlio Perillo
>> <manlio.perillo at gmail.com> wrote:
>>
>>> Hi.
>>>
>>> I have a small question about this use case:
>>>
>>> 1) Create a file named 'x' with content "x", add to repository and
>>> commit
>>> 2) Rename file 'x' to 'y', create and add to repository a new file 'x'
>>> with content "new x", commit
>>>
>>>
>>> Is this fully supported?
>>>
> [...]
>
> I'm under the impression that the original poster meant that the above
> diff was actually wrong, and that re-adding a file which has been
> ''renamed'' (as opposed to copied) should show as an add, not a as a
> modification (he said "add to repository a new file 'x'").
>
Right.
> [...]
>
> i.e. hg thinks that x's removal has been cancelled by the add.
> So you're actually turning a rename into a copy.
>
> This behavior seems perfectly right to me. If one wants a real rename
> followed by an add, this should be done in two separate commits.
I'm not sure if this the right behaviour.
However, before posting this message, I have exactly used two separate
commits to avoid problems (but I don't like).
> [...]
Thanks Manlio Perillo
More information about the Mercurial
mailing list