[PATCH] add support for marking changesets as dead

Idan K idankk86 at gmail.com
Mon Jan 31 14:34:44 CST 2011


On Mon, Jan 31, 2011 at 12:10 PM, Martin Geisler <mg at aragost.com> wrote:

> ...

A dead head is propagated if and only if it kills a head.
>
> To illustrate this, consider the repository:
>
>  0 ---- 1 ---- 2 (dead)
>   \
>    ---- 3
>
> Where the other repository has:
>
>  0
>
> After a pull/push, the other repository would just get changeset 3.
> Had the other repository been:
>
>  0 ---- 1
>
> It would receive both changesets 2 and 3 after a pull/push since 2
> kills the local non-dead head 1.
>

Hi,

I may have missed an earlier discussion about this (sorry for the noise if
so) but the behavior described in your second example scares me.
If I understand correctly a simple pull operation could vanish a bunch of
changesets from my repository without me knowing (in the sense that they
won't appear in 'hg log' without explicitly asking for them).
It's not exactly editing my history but it's making it look like someone
else has which to me seems like something Mercurial has been trying to make
the users very aware of and here it's happening out of the box.

And something else that just popped to my mind, what will happen if I have
changeset 1 (from your second example) currently checked out? Will it also
disappear from 'hg log' after a pull?

Also, if I think of how git behaves in this manner, there you have to
explicitly ask git to remove 'dead' remote heads (git remote prune origin).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110131/ea2625e7/attachment.htm>


More information about the Mercurial-devel mailing list