Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> not to mention git has no equivalent to mercurial's "censor" operation

Haven't followed that for a while, but it used to be the case that it was Mercurial who was principled/fanatic about never rewriting history, ever, while git happily let you mess up with hard deletes.



Which is still the case. They use the hidden phase to avoid that. You can use hg absorb (also awesome) locally of course to simplify matters.

What censor is for is the case where something absolutely has to be removed from the repo, for legal or security. It allows you to do it in a clean standard way, even replacing it with, say, a key signed statement, without forcing regeneration of the whole repository or altering the tree in any way.

Just remove the contents while keeping the hash.

https://wiki.mercurial-scm.org/CensorPlan


... and gotta say. mercurial will let you do hard deletes. They just discourage it and try to offer tooling that allows you to do what you want without destroying history / changing hashes / generally complicating life for those using the repo.

They also do have the tools to completely rewrite history if you really really want to.

So, "principled fanatic" is not quite accurate I feel. They just have a lot more options than git (which also applies to their commandline tooling I feel, although of course there's a lot of 3rd party stuff out there for git to mimic much of what mercurial has out of the box these days).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: