Live data from Hacker News

What's New in Mercurial 3.0

hglabhq.com

11–20 of 118 posts

Re: What's New in Mercurial 3.0

#11
post #8
post #3

Earlier quoted context omitted.

I'm excited because it is SO MUCH more powerful than git's commit history rewriting, because "I re-wrote history" becomes part of your (distributed) repository's history.

Could you explain this difference to a git user?

Changeset evolution doesn't actually delete the entries in the history log. Rather it is a commit that changes what history looks like at a certain point in time. There are CLI commands to show the commits that are actually obsolete or have been rewritten.

Since it's really a commit that changes what history looks like, it's safe to push to other users.

More details here: http://mercurial.selenic.com/wiki/ChangesetEvolution

Re: What's New in Mercurial 3.0

#12
post #8
post #3

Earlier quoted context omitted.

I'm excited because it is SO MUCH more powerful than git's commit history rewriting, because "I re-wrote history" becomes part of your (distributed) repository's history.

Could you explain this difference to a git user?

In git, when you rewrite your history, the old version is gone (well, you still have the revlog for 30 days, but then it's basically over). This is why some commands like `git push --force`after a rebase can cause so much hassle to a community (hello Jenkins!) Here, the principle is te keep all the history, and its rewrites, forever, and to ease the distribution of those changesets.

Re: What's New in Mercurial 3.0

#13
post #3

I am so excited for Changset Evolution. The only thing I miss having from git in mercurial, is the ability to safely rewrite commit history.

I'm excited because it is SO MUCH more powerful than git's commit history rewriting, because "I re-wrote history" becomes part of your (distributed) repository's history.

Exactly! The fact that Git allows you to destructively rewrite history public history is EVIL. Not every user of revision control is going to have a Phd in Not Fucking Up The Repo and I never want a situation like the Jenkins devs had[1] to occur with my projects.

[1] https://news.ycombinator.com/item?id=6713742

Re: What's New in Mercurial 3.0

#14
post #3

Earlier quoted context omitted.

I'm excited because it is SO MUCH more powerful than git's commit history rewriting, because "I re-wrote history" becomes part of your (distributed) repository's history.

Technically git has this too, although not in a very user-friendly form: http://git-scm.com/blog/2010/03/17/replace.html It requires some manual setup on all checkouts for the changes to propagate automatically.

This is not the same. Well, it's sort of the same infrastructure, but it would require a lot of work to actually work like hg evolve.

With Evolve, there is something similar to .git/refs/replace, called obsolescence markers, which may or may not indicate which commit replaces the obsolete commit (some commits are replaced, others are just pruned). These markers are created automatically every time you rewrite history. They don't have to be created manually like with git replace. Moreover, the obsolete commits are hidden from the UI unless you pass the --hidden argument to commands. Lastly, these obsolescence markers are propagated with push and pull operations. It doesn't seem to me like git replace can work over the wire?

Re: What's New in Mercurial 3.0

#15
post #5

I am so excited for Changset Evolution. The only thing I miss having from git in mercurial, is the ability to safely rewrite commit history.

I gave a talk about it at our local Python user group. AMA: https://www.youtube.com/watch?v=4OlDm3akbqg

Is history modifying rebase going away? If I accidently commit "the keys to the kingdom" how do I get them out of the history?

Re: What's New in Mercurial 3.0

#16
post #5

Earlier quoted context omitted.

I gave a talk about it at our local Python user group. AMA: https://www.youtube.com/watch?v=4OlDm3akbqg

Is history modifying rebase going away? If I accidently commit "the keys to the kingdom" how do I get them out of the history?

You can still permanently delete a changeset using `hg strip`. Of course if you have pushed that changeset you will need to run `hg strip` on all remote repositories that have a copy of the commit.

Mercurial will also (very helpfully) create a backup bundle of the changeset you strip, so you will need to securely erase that as well.

Re: What's New in Mercurial 3.0

#17
post #5

Earlier quoted context omitted.

I gave a talk about it at our local Python user group. AMA: https://www.youtube.com/watch?v=4OlDm3akbqg

Is history modifying rebase going away? If I accidently commit "the keys to the kingdom" how do I get them out of the history?

> Is history modifying rebase going away?

In hg "rebase" just means "change the base" not "rewrite commits". So I assume you mean "rewrite" in general.

With evolve, the obsolete commits stay around foreverish, but they slowly fade from history as new people clone or pull, since obsolete commits don't get pulled or pushed by default.

> If I accidently commit "the keys to the kingdom" how do I get them out of the history?

Mercurial never actually removes any functionality, since it's got the deepest commitment to backwards compatibility I've ever seen. Thus, you will delete commits the same way you do now: hg strip --no-backup. That deletes commits with extreme prejudice, locally. Now you just have to run this in every copy of your repo, including remote ones, but the genie-out-of-the-bottle problem is one you can't avoid with a DVCS.

Re: What's New in Mercurial 3.0

#18
post #5

Earlier quoted context omitted.

I gave a talk about it at our local Python user group. AMA: https://www.youtube.com/watch?v=4OlDm3akbqg

Is history modifying rebase going away? If I accidently commit "the keys to the kingdom" how do I get them out of the history?

This is what I was wondering. Is it possible to do this with mercurial? I am thinking that it is, but the evolution thing is a way to handle other types of rebase situations.

Re: What's New in Mercurial 3.0

#19
post #6

Changeset evolution puts mercurial slightly ahead of git here Now if only Atlassian's bitbucket was as popular as github!

Sadly bitbucket does not have very good support for features from "modern" mercurial like bookmarks and changeset evolution. Since most of their users are git users I don't think they are strongly motivated to shore up mercurial support.

Re: What's New in Mercurial 3.0

#20
post #6

Changeset evolution puts mercurial slightly ahead of git here Now if only Atlassian's bitbucket was as popular as github!

Sadly bitbucket does not have very good support for features from "modern" mercurial like bookmarks and changeset evolution. Since most of their users are git users I don't think they are strongly motivated to shore up mercurial support.

Their devs hang out in #mercurial in Freenode and have been talking about how to implement Evolve on the bitbucket WUI.
Post reply on HN