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

Really? I don't think so.

Just try to clone Mercurial repo (Firefox) and roll back in history to specific commit. Let me tell you beforehand - it is (at least used to be) impossible. What you could do is to "clone it again" up to specified point. You have to do it somewhere else on a filesystem just to needlessly spoil disk space and you end up having the same sources at least twice. When I asked why I got handwaving arguments about code history being sacred, which is of course nonsense. If it was so... in Git I'd make another branch and rewind to commit I care about without wasting another 25gigs of disk. How can be this achieved in mercurial these days (without waste)? Back in days I wanted to do some work specifically on Firefox, and those steps were the only I could come up with after a lot of searching and asking questions, and because of Mercurial I gave up, to me it felt like it was a high entry barrier on purpose.

So, no my friend, a lot better wins time.



```

hg clone ssh://example.com/repo

cd repo

hg update -r $SOME_COMMIT_HASH_OR_ID

```

Unless you mean you want to delete history back to a certain point, in which case it's only slightly more complicated.




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

Search: