News for hackers. Stuff that matters.
Re:Adding Mercurial support to Gitlab by maxxxxx on Thursday September 20, 2018 @12:37AM (#18029821)
I still don't understand why git became so popular in comparison to Mercurial. Mercurial seems like a much more friendly and sane system. I hope adding it to Gitlab will help its popularity.
Re:Adding Mercurial support to Gitlab by JoshTriplett on Thursday September 20, 2018 @01:33AM (#18030004)
Speaking as someone who used both Git and Mercurial, and who has used both to contribute to projects:

Git's concept of branches as simple names for commits, and the ability to switch branches really easily within one checkout (rather than encouraging the use of multiple working directories) helped hugely. Mercurial grew the ability to do git-style branching later, but git had it from the beginning.

Git has always treated performance as a first-class feature, and that has enabled certain types of workflows that Mercurial makes painful. Git is fast enough that many things don't feel like they take any time at all.

Git integrated first-class support for carefully constructing and reworking a set of patches to be sent by email. Mercurial again eventually grew such support, but early on, it was much more insistent that all branches must be kept around, and by the way are you sure you don't want to push your development branch experiments up to the server and keep them there forever since you haven't merged that head into the mainline?

Even later on, mercurial had more of the functionality people wanted but relegated it to "extensions", while Git shipped it out of the box.

Take a look at https://walac.github.io/mercurial-for-git-lovers/ (from 2015) for just one of many examples.

Re:Adding Mercurial support to Gitlab by hvidgaard on Thursday September 20, 2018 @02:39AM (#18030241)
About 5 years ago I introduced multiple developers for DVCS, as we migrated away from TFS. I was used to Git, so we used it for a while because we might as well support the tool with the most traction. But after I had to unravel the state of a repository to save work for the 100th time, I assembled a small team to evaluate it. Our conclusion was clear, Git was not working. We rolled out Mercurial for a few projects and it just clicked for the guys, they even began using advanced workflows without central repositories.

So while it might be obvious for you why Git became most popular, I believe that today, it continues to be that way mostly because of GitHub.

Re:Adding Mercurial support to Gitlab by awkward on Thursday September 20, 2018 @02:57PM (#18034683)
I spent a lot of time getting a distributed team that was on a terrible proprietary source control system onto mercurial. Being able to just have them force push their changes and then fix it on my end was a great way to get people on board with it, while my experiences getting a team onto git included a lot of lost code.
Re:Adding Mercurial support to Gitlab by quietbritishjim on Thursday September 20, 2018 @04:37AM (#18030692)
> Git's ... ability to switch branches really easily within one checkout (rather than encouraging the use of multiple working directories)

As a heavy Mercurial user, but only for the last couple of years, I'm confused by this one. You can just as easily switch between branches (in the Mercurial sense) and bookmarks (which are Mercurial's name for Git-style branches). How did that used to be different?

In fact one of the nice thing about Mercurial is that you can easily switch to any commit and you don't need to choose between a hard reset and a detached head, because you can always make a commit anywhere (multiple heads for the same branch) and it will never get garbage collected (a foreign concept in Mercurial). Mostly this is good because you simply never need to understand what these concepts mean, which it turns out are not fundamental to DVCSs. But also this makes a neater alternative to stash (although stash is also available): just commit your half-finished changes, mark the revision "secret" (which means it won't be included in any push), then switch to another revision. You can always strip or rebase the revision later, so long as you haven't pushed it (admittedly these actions do require extensions, but they're included with all Mercurial installations).

Re:Adding Mercurial support to Gitlab by ygra on Thursday September 20, 2018 @04:48AM (#18030741)
Our workflow at work (with Mercurial) revolves heavily around multiple heads for a single branch and relating the commits to a JIRA issue is done by simply putting the issue number in the commit message. So we have (unnamed) feature branches and also no bookmarks for them. You just start from the latest release tag and create new commits. No need to think of a name for the feature branch, or telling the reviewer or issue tracker which bookmark belongs to that issue.

This might be mainly habit and familiarity with a different tool by now, but to me it's simpler than equivalent Git workflows as there's less ceremony involved to start working and there's no fear around accidentally losing commits because they don't belong to a branch (I kinda hate having to go into the Git reflog to find commits that are temporarily lost because they don't belong to a branch).

Re:Adding Mercurial support to Gitlab by bmurphy1976 on Thursday September 20, 2018 @11:02AM (#18032919)
Well that is just about the strangest workflow I've heard of. It sure seems like you are throwing away a lot of the power of the tools to do things manually. Honestly, I don't see the point.

I've used Mercurial from the very beginning, the branches are great and bookmarks are fine. I see no reason why you wouldn't use them.

Re:Adding Mercurial support to Gitlab by ygra on Thursday September 20, 2018 @12:37PM (#18033735)
We use both, just not in the way a typical git workflow would use feature branches. Basically those are all anonymous heads on the same branch for us; a workflow that is probably as alien to git users as naming each and every head is to Mercurial users.
Re:Adding Mercurial support to Gitlab by krupan on Thursday September 20, 2018 @09:45AM (#18032367)
Bookmarks are a relatively recent addition to mercurial, but as you point out you could always easily switch to any commit. It's just that people didn't understand how to work that way early on. The recommended flow of mercurial in the early days was to have a clone per anonymous branch, or to use named branches, if I remember correctly.

We as a community of developers have learned a lot about the power of DVCS since git and mercurial got started. I'd say even the developers of those two tools have learned a lot since then.

Re:Adding Mercurial support to Gitlab by ksec on Thursday September 20, 2018 @10:33AM (#18032690)
>We as a community of developers have learned a lot about the power of DVCS since git and mercurial got started. I'd say even the developers of those two tools have learned a lot since then.

So are we going to have something better than both hg and Git? There hasn't been any new DVCS for a long time.

Re:Adding Mercurial support to Gitlab by krupan on Thursday September 20, 2018 @12:37PM (#18033731)
Pijul, hopefully
Re:Adding Mercurial support to Gitlab by nine_k on Thursday September 20, 2018 @08:54PM (#18036468)
With agpl licence, it has a reduced chance to become mainstream, though.

It's a pity, because I like its technical ideas.

Re:Adding Mercurial support to Gitlab by type0 on Thursday September 20, 2018 @04:46AM (#18030732)
For small teams with a simple code-base Mercurial is a way to go. Being written in a readable language is just a cherry on top. If you eventually need those fancy features that Git provides you could always migrate later.
Re:Adding Mercurial support to Gitlab by weberc2 on Thursday September 20, 2018 @05:35PM (#18035666)
I'm a huge Hg fan, and this thread makes me miss it terribly, but being written in "a readable language" is pretty much negated by all of the shenanigans Mercurial has to pull (including a nontrivial amount of C and Rust) in order to be passably performant.
Re:Adding Mercurial support to Gitlab by hyperpallium on Thursday September 20, 2018 @01:44AM (#18030039)
What is hg's underlying data model?
Re:Adding Mercurial support to Gitlab by Zash on Thursday September 20, 2018 @08:54AM (#18031984)
Abstractly, it's exactly the same as git. Commit → File tree → File data blob.

The underlying data structures used are different, but considered an internal detail, so could be changed in the future. Today, most data is stored in a "revlog", where data can be either be stored (compressed) directly or stored as a (compressed) delta against an earlier version. Deltas may be chained. The index consists of fixed size records, which gives fast lookups, which are also linked to global revision numbers so that you can eg quickly find the commit based on a specific file change.

Obs: This is based on attempting to re-implement the basics of Mercurial from scratch.

Re:Adding Mercurial support to Gitlab by JoshTriplett on Thursday September 20, 2018 @01:57AM (#18030097)
I'm not an expert in mercurial, and I'll defer to those who are.

My understanding is that while Git stores a tree of objects indexed by hash (and then packs them into packs along with an index, which can be repacked arbitrarily later on), Mercurial's primary data format is a log-structured list of revisions as deltas.

Re:Adding Mercurial support to Gitlab by pricechild on Thursday September 20, 2018 @05:58AM (#18031015)
My impression was always that Mercurial wasn't entirely stable/reliable.

Especially the Windows port seemed rather prone to corruption.

Re:Adding Mercurial support to Gitlab by BeetleB on Thursday September 20, 2018 @11:11AM (#18033019)
>Especially the Windows port seemed rather prone to corruption.

Quite the opposite of my perception.

I started with git. Then I got a job and for a while I worked only in Windows. At the time, I looked into git for Windows, and while everyone said it was stable, everyone also said that it was unofficial - the Git development team had stated clearly they were not interested in maintaining a Windows version.

I didn't want to be in the position to justify an unofficial tool to my employer, so I looked at Mercurial - Windows support has been in there since the first day. So I switched to Mercurial. In almost a decade of using it on Windows, I have never had any problems.

Mercurial is great - I've never come across a use case where git is clearly better.

Re:Adding Mercurial support to Gitlab by ygra on Friday September 21, 2018 @06:15AM (#18038551)
Unicode file names were a bit of a pain at one point. Haven't tried that again recently.
Re:Adding Mercurial support to Gitlab by LukeShu on Thursday September 20, 2018 @12:53AM (#18029877)
Having a local "bare" copy (to use Git's term; `hg clone -U`) of the Mozilla repo, I'd like to create a checkout of it (`hg clone`), and build Firefox from it.

This results in 90 minutes of waiting with hg pegging one CPU core (CPU-bound, not disk-bound!), then a few minutes of hg actually writing files, then the actual build taking 60 minutes.

In the git community, it was always taken as a sign that they were doing something right that `git clone` was faster than `cp -r`. I'm having a hard time not taking it as a sign that Mercurial is doing something wrong that `hg clone` is so much slower.

edit: The saying was that `git checkout` is faster than `cp -r`, not that `git clone` is. The sentiment stands.

Re:Adding Mercurial support to Gitlab by ygra on Thursday September 20, 2018 @02:52AM (#18030290)
Mercurial tries to use hardlinks to share as much actual repository data as possible when doing a local clone. Maybe that's the part that's interfering here. You can try using hg clone --pull instead of just hg clone, which will not do hardlinks. Don't have much experience with terribly large repositories in Mercurial, though. Those we have at work have maybe a few thousand files and less than 20k commits and they're not particularly taxing.
Re:Adding Mercurial support to Gitlab by lwf on Sunday September 23, 2018 @01:32AM (#18049551)
`git clone` will also use hardlinks by default.

       --local, -l
           When the repository to clone from is on a local machine, this flag
           bypasses the normal "Git aware" transport mechanism and clones the
           repository by making a copy of HEAD and everything under objects and refs
           directories. The files under .git/objects/ directory are hardlinked to
           save space when possible.

           If the repository is specified as a local path (e.g., /path/to/repo), this
           is the default, and --local is essentially a no-op. If the repository is
           specified as a URL, then this flag is ignored (and we never use the local
           optimizations). Specifying --no-local will override the default when
           /path/to/repo is given, using the regular Git transport instead.
Re:Adding Mercurial support to Gitlab by durin42 on Thursday September 20, 2018 @11:34AM (#18033199)
How long ago was this? And what OS? I know we're faster than unzip on some platforms, but IIRC we just found a pretty awful performance issue on...linux? I think?... that meant our parallelized approach to writing files was burning a ton of time in the kernel filesystem locks or something.
Re:Adding Mercurial support to Gitlab by LukeShu on Thursday September 20, 2018 @12:51PM (#18033831)
Just a few days ago. Parabola GNU/Linux-libre (like Arch Linux). On btrfs, if that makes a difference.

From what I could tell, whatever the slow part is, it wasn't parallelized at all; of 16 cores, 15 were idle, and 1 was pegged at 100% (and very low disk-wait).

I've been meaning to dig in to this more. I'd tried adding --stream, figuring that maybe it was re-compressing the entire repo; but that just lead to a warning about "server doesn't support streams" or something like that. I'll definitely try ygra's suggestion to try --pull, and if that doesn't yield good results, I'll actually dig in to the sources and see what's going on.

Re:Adding Mercurial support to Gitlab by durin42 on Thursday September 20, 2018 @02:04PM (#18034362)
Sounds a lot like https://twitter.com/indygreg/status/1028097388261433344 - I'm pretty sure Greg was working with hg when he noticed this issue.

In any event, if you're enthusiastic about this kind of thing, we'd love to have more eyes on making hg checkouts consistently fast, even in the face of filesystems undermining those efforts. ;)

Re:Adding Mercurial support to Gitlab by LukeShu on Thursday September 20, 2018 @05:38PM (#18035675)
If it were just btrfs being silly, I'd expect the high CPU usage to be attributed to a kernel thread, not to the hg process. But we'll see :)
Re:Adding Mercurial support to Gitlab by sometimesijust on Thursday September 20, 2018 @01:38AM (#18030020)
I have pulled and built Firefox from scratch over Australian internet in less than half that time? In general I have found all Mozilla repos to be an order of magnitude faster for this type of operation than the equivalent Google/Chrome repos (not using build caches).
Re:Adding Mercurial support to Gitlab by LukeShu on Thursday September 20, 2018 @10:46AM (#18032782)
The actual network clone is faster than that. The slow clone that I'm speaking of is cloning from one place on my hard drive to another place on the same hard drive.
Re:Adding Mercurial support to Gitlab by voltagex_ on Thursday September 20, 2018 @12:57AM (#18029887)
How is git clone faster than `cp -r`?
Re:Adding Mercurial support to Gitlab by LukeShu on Thursday September 20, 2018 @01:13AM (#18029938)
Re:Adding Mercurial support to Gitlab by simcop2387 on Thursday September 20, 2018 @01:09AM (#18029924)
My first guess would be that git is going to be faster since it won't be doing a huge number of stat() calls and similar to grab metadata about the files it's creating, instead git will have the data in a single data structure it can efficiently ask for it from. Of course the filesystem has this too, but git will have it in a single location and probably more compactly, leaving it able to do it all with fewer reads. Then it has the data in the files compressed so the read is faster too. All this should mean that git can get to writing the files faster than cp will.
Re:Adding Mercurial support to Gitlab by dleslie on Thursday September 20, 2018 @01:04AM (#18029910)
It may be in relation to when you duplicate a repository.

When you cp an active git repository you receive an identical file state; when you git clone you receive only what is necessary. Old objects, reflogs, et al aren't in the clone. A clone of an existing local repository may also make hard links, if your file system supports it.

Re:Adding Mercurial support to Gitlab by mprev on Thursday September 20, 2018 @02:18AM (#18030168)
The battle seemed to be between Bazaar and Mercurial for so long. Both were easy-ish to use and both were written in Python.

Mercurial usually had the speed advantage but then git came along and wasn’t written in Python. Speed wise it blew Bazaar and Mercurial out of the water.

It was harder to learn for someone used to svn, perhaps, but the sheer weight of both Linus and Linux made it hard to ignore.

I think GitHub deserve a lot of the credit for git’s omnipresence, though. With Launchpad our aim was to create something bigger than “just” a code sharing site and fairly or unfairly both Launchpad and Bazaar were seen as too close to Canonical. Whereas GitHub picked up the mantle that Sourceforge had dropped and made something way more collaborative than Sourceforge but held onto the idea of being a neutral third party.

Re:Adding Mercurial support to Gitlab by lake99 on Thursday September 20, 2018 @02:34AM (#18030229)
> Speed wise it blew Bazaar and Mercurial out of the water.

Benchmarks for this are hard to come by, and are for versions that are considered quite outdated now. But from what little there is, there wasn't that much of a performance difference between git and hg. For example, see this: https://www.draketo.de/proj/hg-vs-git-server/test-results.ht...

Re:Adding Mercurial support to Gitlab by CamouflagedKiwi on Thursday September 20, 2018 @02:51AM (#18030284)
Fair, but that misses a bunch of short-running simple operations where hg does badly; things like "print the repo root" or "print the current branch name" take several milliseconds in Git, but Mercurial needs an order of magnitude longer (see e.g. https://www.mercurial-scm.org/wiki/OxidationPlan for some description of the issues there). Doesn't seem like much, but those add up, especially when they're wrapped up into other scripts that might run several of those in sequence.
Re:Adding Mercurial support to Gitlab by lake99 on Thursday September 20, 2018 @05:29AM (#18030901)
Yes, there is a penalty of starting and stopping the Python interpreter every time, which is why they want to implement the front end command in Rust. For scripts, current users are better off adapting to the current hg ecosystem, and writing their scripts in Python.
Re:Adding Mercurial support to Gitlab by type0 on Thursday September 20, 2018 @05:10AM (#18030821)
Thanks for the link. I was not aware that hg on windows was that painful, plus all the dll hell that makes it hard for Rustification.
Re:Adding Mercurial support to Gitlab by mprev on Thursday September 20, 2018 @02:41AM (#18030253)
Well, sure they’re outdated because we’re talking about stuff that happened at least ten years ago.

As for benchmarks, I don’t have any but there’s plenty of anecdata elsewhere in this thread that echoes the idea that git had significant speed advantages over both bzr and hg.

Re:Adding Mercurial support to Gitlab by fnord123 on Thursday September 20, 2018 @05:19AM (#18030859)
>both Launchpad and Bazaar were seen as too close to Canonical

I think it's more that Launchpad is terribad. No matter how much I used it, I struggled to get to the code so I could read it. It looks like it's been somewhat fixes now with a small "Browse the code" link on the project landing site. It used to be like 4 clicks if you knew what to look for.

And when I used bazaar (on Arch in 2004 trying to contribute to Exaile), it would pin a core and make no progress. I didn't look at it again.

Re:Adding Mercurial support to Gitlab by inferiorhuman on Thursday September 20, 2018 @02:22AM (#18030185)
Bazaar... now there's a name I've tried to forget.
Re:Adding Mercurial support to Gitlab by stevekemp on Thursday September 20, 2018 @11:27AM (#18033141)
I think my history went something like this:

RCS -> CVS, CVS -> SVN, SVN -> Darcs, Darcs -> Mercurial, then Mercurial -> Git.

Bazaar I had to use for interactions with Ubuntu, but never in a serious way. Similarly I used a few other things such as Visual Source Safe (shudder), SCCS, and even BitKeeper, but I think they were used quite shallowly.

Re:Adding Mercurial support to Gitlab by zeckalpha on Thursday September 20, 2018 @07:35AM (#18031446)
Mercurial and git started the same month.
Re:Adding Mercurial support to Gitlab by simias on Thursday September 20, 2018 @05:52AM (#18030991)
I used Mercurial as my main DCVS (and even pushed it at work) for many years, but now I faced the fact that git won and use it for everything. I have to use git anyway, so I might as well not deal with two different workflows and use git exclusively.

Mercurial was ahead of git for a long time as far as usability and documentations were concerned. I still think it's a better match than git for many uses cases. Mercurial makes the simple stuff simple and the complicated stuff complicated (although still achievable), whereas git is more of a mixed bag in my experience. Git was superior for very large projects with many contributors working on completely different features and sending each other patches by email (e.g. the Linux kernel) but in practice 99% of projects, both FLOSS and corporate, don't have this profile. Git is a formula one, mercurial is more like a comfortable Sedan, so to speak[1].

I think git made it mainly because it could boast hosting the Linux kernel development and all the cool kids were on github.

[1] Which reminds me of this "Git is MacGuyver, Mercurial is James Bond" comparison which is probably widely out of date by now: https://importantshock.wordpress.com/2008/08/07/git-vs-mercu...

Re:Adding Mercurial support to Gitlab by rimliu on Thursday September 20, 2018 @02:16AM (#18030164)
As someone who did a presentation on DVCS for the local PHP devs in 2008 I have no problem understanding that. I covered Git, Mercurial and Bazaar. Even back then I predicted that git will win. It might not look very user friendly, but the foundations were rock solid. Branches on Mercurial seemed very clunky compared to git's.
Re:Adding Mercurial support to Gitlab by vnorilo on Thursday September 20, 2018 @03:19AM (#18030382)
While I don't consider myself a wiz, I'm fairly proficient at both (was responsible for stuff like lfs and submodule reorganization on git in my previous job). I'm honestly surprised that someone adept at one would struggle with the other: you basically just need to understand the semantical differences in branching. On windows, hg plays much nicer with powershell (ok, so clean is an extension, otoh hg -nu | rm).
Re:Adding Mercurial support to Gitlab by philjohn on Thursday September 20, 2018 @03:57AM (#18030525)
It's not even that - it's mostly just the commandline interface needing you to learn several arcane commands to do simple operations.

Of course, if you understand the underlying data model, they seem far less arcane, but that's the problem with Git that Mercurial doesn't have - you really need to understand what's happening under the hood to get proficient at it, whereas Mercurial has a far saner interface that hides the internals under a better abstraction.

Re:Adding Mercurial support to Gitlab by jgraham on Thursday September 20, 2018 @06:42AM (#18031203)
I really don't think that mercurial is very good at hiding the internals. Consider a common operation; asking for the commit history. If you type `hg log` you get something very close to a prettified view of the internal datastructure by default; a list of all commits in the repository, in the order they were added, each annotated with a sequence id that's an index into the internal list. So a new user has to learn:

* hg log by default doesn't tell them anything about the current code they're working on; it's just a dump of everything. To get the history of the current working copy they need to pass -f which they are learning in other contexts means "do something unsafe".

* hg gives commits sequence ids that can locally be used in place of the commit sha, but must never be shared across repositories.

In practice at Mozilla I have seen people run into both these issues, causing much unnecessary confusion.

Re:Adding Mercurial support to Gitlab by jazzyjackson on Thursday September 20, 2018 @04:43AM (#18030722)
I agree with this, but OTOH, in my experience git actually has a nice smooth learning curve for a little while until you hit your first 'wtf did did I just do' snag.

I just know on my team or 5 much less technical people, the concept of version control and how to do operations in Mercury was near impossible and it fell on one person to manage merging files with master.

Also, this was a distance learning course where the head institution (MIT Media Lab) was keeping a central repo of every location's additions, and the changes made the repo so big that we had hard caps on how much data we could upload.

Later on, it fell on me to introduce git to some colleagues. Just walking them through 'checkout','branch','merge','push','pull' got them on their feet and contributing to a repo. If they hit a wall, I could help detangle the knot, but at least we were in it together.

Re:Adding Mercurial support to Gitlab by paulwithap on Thursday September 20, 2018 @01:57AM (#18030096)
I think git became dominant because there's no MercurialHub
Re:Adding Mercurial support to Gitlab by weberc2 on Thursday September 20, 2018 @05:48PM (#18035729)
This is the correct answer. For some reason, the top-voted comment is some nonsense about Git's branching, which was never something I've desired or every found useful in a decade of rigorous daily use with both. To the contrary, git's branching model still trips me up all the time, specifically when I want to do things like list all the commits in the branch.

Basically the problem is that unlike Mercurial branches which are actually branches while git branches are just a pointer to a particular commit. That pointer has no knowledge about what other commits are in the branch and the pointer can be moved anywhere across the tree (even to unrelated commits) with ease. Apart from the reflog, it's basically not possible to ask about the set of commits in the branch. The best you can do is never ever move the branch pointer except forward and make a note of the branch that your branch branched off of so you can do things like `git diff my-branch..parent-branch` (`hg diff -b my-branch` iirc). And this is just one of dozens of git warts.

Re:Adding Mercurial support to Gitlab by JimDabell on Thursday September 20, 2018 @02:04AM (#18030119)
Bitbucket was the Mercurial equivalent of GitHub.
Re:Adding Mercurial support to Gitlab by ksec on Thursday September 20, 2018 @10:48AM (#18032803)
I think Github was way better than Bitbucket in its early days.
Re:Adding Mercurial support to Gitlab by xtreak29 on Thursday September 20, 2018 @12:57AM (#18029890)
I use hg at work and git for open source. I can agree that GitHub and GitLab add momentum to git. Bitbucket is the almost the only provider. I feel hg can do the same things like git but a lot of that power is hidden under extensions in hg. I also love git releases that add a lot of UX improvements. Git is also fast compared to hg due to python startup time and it's one of the reasons hg still remains on python2. There is some effort on reorganizing python startup layout which will lay the foundation for faster hg. I hope with GitLab support hg gets more support and visibility.
Re:Adding Mercurial support to Gitlab by IshKebab on Thursday September 20, 2018 @12:49PM (#18033813)
I would say a combination of things:

1. Network effects of github becoming popular. 2. It's faster. 3. Linux uses it and it was written by Linus (must be good in some people's minds).

Re:Adding Mercurial support to Gitlab by camgunz on Thursday September 20, 2018 @01:13PM (#18033990)
Ruby and Rails were big at the time, and those communities really took to Git. There was kind of a competition between them and Python, so maybe that had some influence on not picking Mercurial/Bazaar, but regardless I think it wasn't as grounded in technical points as we'd like to think.
Re:Adding Mercurial support to Gitlab by dekhn on Thursday September 20, 2018 @09:15AM (#18032146)
From chatting with various folks, I think git had some features before Mercurial did. I recently adopted hg and found it much smoother to use, but learned also that many of the features I depended on were added only very recently.
Re:Adding Mercurial support to Gitlab by pjmlp on Thursday September 20, 2018 @01:04AM (#18029909)
Simple, Linux.
Re:Adding Mercurial support to Gitlab by another-cuppa on Thursday September 20, 2018 @04:26AM (#18030640)
This is definitely part of the reason. Back when git was first released there was a huge amount of scepticism about whether anyone actually needed it, but lots of people used it anyway just because they wanted to use what Linus made for Linux.

I think since then many people have realised that Linus was right and that git is good, but it just wouldn't have gained so much momentum without Linux.

Re:Adding Mercurial support to Gitlab by akvadrako on Thursday September 20, 2018 @05:54AM (#18030999)
I don't think people found git better than hg (or monotone), but it got a lot more attention (due to Linus) and using two different systems is a pain.
Re:Adding Mercurial support to Gitlab by MikusR on Thursday September 20, 2018 @05:09AM (#18030815)
In Windows Git allows to use non ascii letters for filenames.
Re:Adding Mercurial support to Gitlab by bipson on Thursday September 20, 2018 @04:06AM (#18030559)
We used hg in a uni project once, since large parts of our team had never used a VCS, and on of our advisors urged us to consider hg. (This was around 2010, so I guess hg improved considerably since then.)

Even considering the additional overhead, we switched to git after a few weeks since the repository was constantly broken, and the two of us that knew git and SVN were desperately searching for the consistency and tools we had in git. At least we could support the team from there on and make it work for them. Not the ideal solution, but the best available to us.

So I totally understand why git is more popular than hg. Until hg could be considered mature enough for larger teams, git already had a huge following, IMO.

Re:Adding Mercurial support to Gitlab by lclarkmichalek on Thursday September 20, 2018 @05:47AM (#18030966)
Given that all of Facebook's repository's are hg based, I think it's fair to say that is pretty mature for large team use cases
Re:Adding Mercurial support to Gitlab by bipson on Thursday September 20, 2018 @12:16PM (#18033556)
Facebook didn't use hg until 2012 or later. I was talking and only know about the state of hg in 2010/2011 and at that point, git was widespread, stable and widely more useful than hg for anything besides simpler/smaller projects, again IMO.
Re:Adding Mercurial support to Gitlab by andrewshadura on Thursday September 20, 2018 @01:37PM (#18034174)
Hg was pretty mature by 2007 when I started using it.
Re:Adding Mercurial support to Gitlab by mixmastamyk on Thursday September 20, 2018 @03:00PM (#18034713)
I used hg for years before finally succumbing to git. Never had a single issue with hg.