Live data from Hacker News

I kind of killed Mercurial at Mozilla

glandium.org

61–70 of 250 posts

Re: I kind of killed Mercurial at Mozilla

#61

Linux kernel development never used cvs, I believe Linus thought it gives people brain damage and did just send around patches and tarballs

Linus never used CVS, but there was a CVS server and the community was using it. https://flosshub.org/sites/flosshub.org/files/127-131.pdf

parts of the community, if I recall correctly, and to be clear to everyone else since I'm sure you know this:

1. linus didn't use version control at all, he just got patches emailed to him, then every now and then he'd publish a tarball and incremental patches (e.g. a 2.4.11-rc2 patch on top of 2.4.11-rc1) - the world had no visibility into his tree's development aside from the tarballs and inter-version patches he sent out

2. and because of that, no one else used version control for submitting changes, they just sent patches to lkml

3. there was some use of CVS for some ports / subsystems, but again, it was used to generate patches to email to linus

4. people built lots of tools around this work flow, like `patchwork` and horrible shell scripts

Re: I kind of killed Mercurial at Mozilla

#62

Earlier quoted context omitted.

That change was so dumb. Mercurial support was the bit that put them as something different from github. Once they didn't have it anymore, why would anyone use them at all?

So since you are knowledgeable about the fact that this decision was "dumb", you must also know approximately what proportion of their users were dependent on hg for their workflow ? My priors would put it at less - likely far less - than 1%. But please share your knowledge.

Still seems near-sighted. If someone started a new mercurial project what would they choose to host it on? BitBucket basically automatically wins new users by being the only player in the game

Re: I kind of killed Mercurial at Mozilla

#63
post #50

I've heard this point of view many times, but cannot find an extensive explanation of it. Could anyone elaborate on the issue with the GitHub review UI/UX? > I hate the GitHub review UI with a passion. At least, right now, GitHub PRs are not a viable option for Mozilla [...] the more general shortcomings in the review UI.

I once worked with a guy who hated Python. He also hated IntelliJ and did all of his programming in Eclipse. He hated MacOS and would only run old versions of Windows of Linux. What I found was that he was just sensitive to change. It took him awhile to get comfortable with something but as soon as he did he would from then on resist any change. Anything that was different to what he was used to he hated . In some se…

GitHub PRs are both bad process (no stacking or per-commit review, incentivizes large changes, ...) and bad tool (no inter-diffs, noisy diffs, comments disappear through rebases, slow, ...).

Re: I kind of killed Mercurial at Mozilla

#64

Linux kernel development never used cvs, I believe Linus thought it gives people brain damage and did just send around patches and tarballs

Of course you can run your project like Linux. Your first requirement is to employ Linus Torvalds as a project manager.

Re: I kind of killed Mercurial at Mozilla

#65

I've heard this point of view many times, but cannot find an extensive explanation of it. Could anyone elaborate on the issue with the GitHub review UI/UX? > I hate the GitHub review UI with a passion. At least, right now, GitHub PRs are not a viable option for Mozilla [...] the more general shortcomings in the review UI.

I know people who express similar feelings. Usually it is shorthand for "I would prefer stacked diffs" or similar. Two blog posts I've seen people point at: * https://mitchellh.com/writing/github-changesets * https://jg.gg/2018/09/29/stacked-diffs-versus-pull-requests/

I've found that Graphite [0] has solved this issue for me. It's makes the experience of shipping stacked diffs about the same as the CR tool within AWS

[0]: https://graphite.dev/

Re: I kind of killed Mercurial at Mozilla

#66

Earlier quoted context omitted.

I know people who express similar feelings. Usually it is shorthand for "I would prefer stacked diffs" or similar. Two blog posts I've seen people point at: * https://mitchellh.com/writing/github-changesets * https://jg.gg/2018/09/29/stacked-diffs-versus-pull-requests/

From the second article, a minor point but possibly helpful to other here, he contrasts doing everything in the terminal with stacked commits vs going to the Github UI. If people aren't aware, Github offers a cli tool[1]. I've been using it for a few months now and am finding it does make me more productive -- it's nice to be able to open up a PR directly from my terminal. I do still use the GH UI for a lot of things…

The CLI doesn't help with stacked commits, though. There's tools like spr[1] but none of them are anywhere as pleasant to use as Gerrit (or Phabricator, I guess).

[1]: https://github.com/ejoffe/spr

Re: I kind of killed Mercurial at Mozilla

#67
post #2

Interesting, given that Google and Facebook [2], at least, eventually moved to have their repositories offered via Mercurial interface, instead of git. I also would expect that Github eventually will also offer mercurial repos. p.s. And let's not talk about abomination that is GitLFS (starting from the fact that it requires separate subcommand). [2] https://engineering.fb.com/2014/01/07/core-infra/scaling-mer...

https://cacm.acm.org/magazines/2016/7/204032-why-google-stor... is a public reference for Mercurial front-ending Piper.

Re: I kind of killed Mercurial at Mozilla

#68
post #62

Earlier quoted context omitted.

So since you are knowledgeable about the fact that this decision was "dumb", you must also know approximately what proportion of their users were dependent on hg for their workflow ? My priors would put it at less - likely far less - than 1%. But please share your knowledge.

Still seems near-sighted. If someone started a new mercurial project what would they choose to host it on? BitBucket basically automatically wins new users by being the only player in the game

They gave away free private repositories when Github was charging $7/month. That's the only reason they had most of the users they had.

Re: I kind of killed Mercurial at Mozilla

#69

I've heard this point of view many times, but cannot find an extensive explanation of it. Could anyone elaborate on the issue with the GitHub review UI/UX? > I hate the GitHub review UI with a passion. At least, right now, GitHub PRs are not a viable option for Mozilla [...] the more general shortcomings in the review UI.

Most of the projects that dislike GitHub's review UI want the functional equivalent of `git range-diff`. Code review systems like Phabricator and Gerrit basically revolve around this as basis of thinking about diffs, their evolution, and how code review progresses.

You want to write 3 patches to a project, that are committed in series, based off of `X`

         A ---> B ---> C
    X---/
Let's say A cleans up some code, getting it ready for B; it is not mandatory but was just naturally done as part of the change; maybe it's 50 lines. B then adds 500 lines of new code to be reviewed. Finally, C integrates the new code from B; maybe you migrate something to use it, changing a few internal API calls. So C might be a diff of only 5 or 10 lines.

The code reviewer will want to start by reading A, and leaving comments on A. And so on for B, and so on for C. Let's say they leave code review comments on each commit. So now you have a set of things to do.

GitHub encourages you to add a new set of patches on top of the previous 3, so you might publish add commits on top:

         A ---> B ---> C --- > D ---> E ---> ...
    X---/
Where each change after C incrementally addresses review comments.

In contrast, tools like Gerrit and Phabricator say instead that you should publish new versions of A, B, and C, wholesale. So now we have a new series of 3 patches:

         A' ---> B' ---> C'
    X---/
This branch might exist in parallel to your old one. So your full commit graph might look like this, now:

           A  ---> B  ---> C
          /
         /-A' ---> B' ---> C'
    X---/
So there's the original series of changes A,B,C, and the new series of changes that respond to all the comments. Think of that as "version 1" of the series and then "version 2"

Now here's the question: how does the code reviewer know that you addressed their comments? Answer: they need to do a range diff between the original version 1 series and the version 2 series:

    A  ---> B  ---> C
    |       |       |
  d(A,A') d(B,B') d(C,C')
    |       |       |
    A' ---> B' ---> C'
Where d(x,y) = diff(x,y). You're looking at the diff between the two versions of one patch. So instead you view the changes between version 1 of A, and version 2 of A. And so on and so forth for all 3 patches.

This is very useful for example because B might be 500 lines, but responding to review comments may only take 50 lines of fixes. It would be very annoying to re-read the entire 500 line patch, as opposed to just the 50 line incremental patch. This has very big effects as the review cycle goes forth.

People mostly like this review style because it keeps needless "fix review comment" commits out of the history and it "localizes" the unit of code review to each individual patch rather than the whole aggregate. Note that the final version of the series A,B,C will just contain those 3 logical changes, not 3 logical changes + 1 dozen fixup changes.

This not only makes changes more "dense", it improves the ability to navigate the history, and do things like `git blame`; and it means you don't commit things like "fix failing test" which would break bisection.

Note that most of the systems that implement the above review style do not literally use `git range-diff` in their implementation; rather, git range-diff is simply an implementation of this idea that you should review each version of a patch as a diff from the previous version. The tools themselves have their own lifecycle, patch management, APIs, etc that are wholly different from Git's.

Finally, there are lots of things GitHub's UX is just slacking on, functionality aside. You can't comment "anywhere" in a code review, just on changed lines. An annoying one I hate is that you can batch review comments but not batch review resolutions; if you leave 5 comments on a diff, you submit them as a batch. But if you resolve 5 comments, you do it one at a time, which is annoying and easy to lose track of. The UX has too many tabs you have to swap between, which is pointless when you could just make the page a little longer and things like Ctrl+F would work better. And so on, and so forth.

Re: I kind of killed Mercurial at Mozilla

#70
post #2

Interesting, given that Google and Facebook [2], at least, eventually moved to have their repositories offered via Mercurial interface, instead of git. I also would expect that Github eventually will also offer mercurial repos. p.s. And let's not talk about abomination that is GitLFS (starting from the fact that it requires separate subcommand). [2] https://engineering.fb.com/2014/01/07/core-infra/scaling-mer...

I knew the guy who wanted Google Code to be Mercurial based; he pretty much just did it because he liked Python and therefore thought anything written in Python was good.

hg split is a lot more tedious to do in git.
Post reply on HN