TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mercurial developer responds to "Switch to git?"

207 pointsby St-Clockover 11 years ago

15 comments

ggchappellover 11 years ago
Articles like this worry me a lot.<p>Most of this post leaves me thinking, &quot;Why should I be worrying about things like this?&quot; A fair amount of it leaves me at least somewhat boggled; I suspect I&#x27;m not alone here. The idea that a user of a DVCS needs to be familiar with issues like these tells me that something is seriously wrong with the design of DVCSs.<p>Remember, a DVCS is a tool we use to track and store data related to a project. The <i>project</i> is what we are interested in: the Python or C++ or LaTeX or whatever. Git, Mercurial, etc. are just there to help us keep track of the real work. Time spent dealing with the intricacies of Git is time not spent on the primary task -- the thing that Git is supposed to <i>help</i> us with.<p>Consider filesystems, which are also tools used to manage stored data. If I&#x27;m writing some Python thing, I don&#x27;t proclaim to everyone that I&#x27;m storing my work on a ReiserFS volume, and I&#x27;m thrilled by the fact that ReiserFS indexes its metadata using a B+ Tree. I just store my data.<p>I think a well-designed DVCS would be thought of in much the same way. Clearly, current DVCSs aren&#x27;t. Something is very much amiss, folks.
评论 #6751993 未加载
评论 #6752114 未加载
评论 #6752006 未加载
评论 #6752132 未加载
评论 #6751978 未加载
评论 #6752391 未加载
评论 #6754033 未加载
评论 #6752375 未加载
评论 #6753034 未加载
评论 #6752315 未加载
评论 #6752450 未加载
评论 #6753091 未加载
评论 #6755040 未加载
评论 #6754037 未加载
评论 #6752460 未加载
评论 #6752645 未加载
评论 #6754877 未加载
jherikoover 11 years ago
i am worried about the popularity of git to be honest. i&#x27;m convinced it is popular rather than good.<p>&quot;I&#x27;ve really tried to &#x27;get into&#x27; mercurial&#x27;s mindset several times now, but never could, whereas, IMO, git&#x27;s model is simple and powerful. &quot;<p>I find it hard to understand what this means, but this is typical of the arguments i see for using git. really the core concepts of DVCS are the same no matter what tool you use, and actually i consider the things that git does differently to hg to be demonstrably and measurably counter-intuitive and in some cases dangerous.<p>the biggest problem by far is that <i>git is dangerous out of the box</i> - it can destroy your work very easily or leave you in an unrecoverable state.<p>why can&#x27;t i roll back a merge in one step if i didn&#x27;t configure things to be able to do that? why does my branch disappear when i merge? how do the jenkins guys break their repo so casually and find themselves struggling to recover it?<p>i believe this is the robustness mentioned here: &quot;The changeset graph is in some sense more &quot;robust&quot; in that it&#x27;s just there and doesn&#x27;t change on its own initiative&quot;<p>mercurial seems loathe to alter history - which is pretty sane and common sensical seeming to me, git does it as part of how it is &#x27;supposed to be used&#x27; which frankly sounds as mad as travelling back in time to shoot your grandfather. for these reasons - to me - using git is asking for trouble (it has caused me trouble and i switched to hg for precisely this reason).<p>i cant reasonably recommend git to anyone... which is a shame. other than that flaw it is really quite rich and powerful and has other advantages over mercurial - including (perhaps foremost) its enormous popularity.<p>EDIT: watch as this gets downvoted from hipster gut responses instead of thought :D
评论 #6751869 未加载
评论 #6751909 未加载
评论 #6751880 未加载
评论 #6751881 未加载
评论 #6751849 未加载
评论 #6752105 未加载
评论 #6752251 未加载
评论 #6751889 未加载
评论 #6752340 未加载
评论 #6751939 未加载
评论 #6753095 未加载
评论 #6753186 未加载
评论 #6751789 未加载
评论 #6753279 未加载
tracker1over 11 years ago
I really appreciated that this response was not overbearing, or just raw opinion, and rather compared many of the similarities and differences from mercurial to git, and how they approach similar issues differently.<p>Honestly, I&#x27;ve struggled in moving from SVN&#x2F;TFS to GIT, but it&#x27;s been worthwhile.. having local branching, and being able to work locally is great. I can&#x27;t really compare this to hg, as I haven&#x27;t worked with mercurial at all.<p>The company I work for has moved a lot of its&#x27; development to a github enterprise deployment, and it&#x27;s been interesting. I like git extensions for windows, though it&#x27;s a bit rough around the edges. It&#x27;s also a bit limited in terms of VS integration, but I can manage. I think that Tortoise + Ankh was a better combination overall in terms of the polish of the tooling, over what git currently offers.<p>I tend to now work with a few console windows open, and have been using the command line much more.
评论 #6751701 未加载
评论 #6752079 未加载
评论 #6751976 未加载
评论 #6751641 未加载
St-Clockover 11 years ago
I quit using Mercurial around 1.4 and was happily surprised by all the improvements in 2.8 (shelve, bookmark improvements, etc.). Martin Geisler&#x27;s reply was both thoughtful and respectful, a rare sight in this debate.
评论 #6751678 未加载
DigitalSeaover 11 years ago
It&#x27;s refreshing to see someone with a level-headed response who doesn&#x27;t fly off the rails defending their source control tool of choice, unlike what you usually see with developers of well-known frameworks like PHP and Ruby. I don&#x27;t personally use Mercurial myself, but it doesn&#x27;t seem like a bad source control choice, anything is better than SVN, right? Git and Mercurial both seem like great and sensible choices.
评论 #6751800 未加载
评论 #6751815 未加载
评论 #6752277 未加载
tytsoover 11 years ago
After reading most of the comments, and having participated on more than a few git vs. &lt;insert random DCVS&gt; discussions, here are what I hope are some hopefully new contributions.<p>All systems have different tradeoffs depending the target audience that they are trying to optimize for. When comparing bzr, hg, and git, one way of thinking about it is that they differ in the size of the developer community of the project that they are trying to optimize for. The sweet spot of bzr is probably up to ten or so active developers at one time; for hg, it&#x27;s probably up to around hundred or so; and for git, it&#x27;s designed to scale up to several thousand active developers. Different people might want to argue over the exact breakpoints, but in terms of orders of magnitude, I think it&#x27;s pretty close.<p>One comment that was made in a thread below was that git was optimized for the people who integrate code, as opposed for those who actually produce the code --- and I think that&#x27;s mostly true. Which is to say, when there was a choice between optimizing for a project which might make things easier for the integrator, or for the sub-integrator, or sub-sub-integrators (in Linux code integration happens in hierarchically; it&#x27;s the only way we can scale), and making it easier for a newbie coder, git has very unapologetically optimized for the former. It&#x27;s true that there are some warts which caused by legacy UI decisions which would probably have made differently if the designers could go back in time, but in my mind these are in the cateogry of things like TAB characters being significant in Makefiles; it&#x27;s annoying, but practitioners very quickly learn how to deal with these warts, and they generally don&#x27;t cause significant problems once people get over the startup hump.<p>The other observation is that since choice of which DCVS gets made is generally made by project leads, who tend to be the integrators, it&#x27;s not that surprising that git is very popular for them. It&#x27;s also true that most project leads tend to be over-optimistic about whether their project will be the one that will grow up to have thousands of active committers (just as most startup founders are convinced that their baby will be the defeat the odds and become the wildly successful IPO whose market cap will exceed $4 billion dollars :-).<p>Given that most projects generally don&#x27;t have thousands and thousands of active developers, it might be that hg is a better choice for most projects. However, if most of your senior developers are more used to using git, because that&#x27;s what they are mostly familiar with, maybe you might want to use git even though the project&#x27;s scale is one that would be quite satisfied with hg. For me, the e2fsprogs project falls in that category; while the number active developers are such that hg would be fine, most of the developers are simply much more used to git, and so we use git.<p>The third reason why git has probably become popular is because github is really good at hiding many of git&#x27;s rough edges, and if people are used to github, then it might be a good set of training wheels before people graduate to using git without github&#x27;s training wheels.<p>If these three factors don&#x27;t apply to your community, then maybe hg is a better choice for you. If that&#x27;s true, then don&#x27;t hesitate! One thing that most people forget is that while transitioning between DCVS is painful, it can be done. So if it turns out the situation changes in three or five years, it is certainly possible to convert your project from hg to git. It will be rough for a month or two, but for some projects, that might actually be better than starting with git, and then finding out that it caused some increased friction initially, and that they never needed the scale that git provides.
philliphaydonover 11 years ago
I don&#x27;t think Mercurial is the issue here...<p>Google Code is the issue... Didn&#x27;t realise people still used that, its worse than Codeplex. Atleast use Bitbucket or something that makes it easier for people to contribute to while still keeping it with Mercurial.<p>I&#x27;ve found bugs in stuff before and ended up using a different project&#x2F;library for the sole reason that I found out its in Google Code and the amount of effort involved in using the site let alone raising an issue or fixing it just wasn&#x27;t worth it.
评论 #6752567 未加载
shadowmintover 11 years ago
I think the big summary of this post comes down to, if you don&#x27;t have something like:<p><pre><code> [extensions] shelve = histedit = rebase = mq = </code></pre> As a git developer using hg you&#x27;re going to be frustrated by all the things &#x27;hg doesn&#x27;t support&#x27;.<p>It doesn&#x27;t actually not support them, they&#x27;re just (for some reason?) shipped with hg but not turned on by default.
评论 #6752099 未加载
fhd2over 11 years ago
After 4 years of Git and 1 year of Mercurial, I like them roughly equally. I love cheap local branches, I also love MQ. They&#x27;re just tools, I wish people could get over this kind of stuff.<p>If this is really about getting more contributors, I suggest a GitHub mirror. We do that, it&#x27;s not a big deal (hg-git is pretty good), and it does get us more contributors.
encodererover 11 years ago
Having used both extensively, Git at one job, HG at the next, now Git again, I mostly have this to say:<p>Both tools lack polish.<p>The biggest piece of mis-information I&#x27;d like to clear up is that often times a user new to either of these makes a few mistakes and then the cold hand of death grabs them and they&#x27;re certain they lost work. You never really do. In Mercurial, the permanent nature of named branches and in Git the reflog both serve you well. Seek help in such a case, because if you think you lost work, you almost certainly didn&#x27;t.<p>Edit:<p>Also, if you&#x27;re using HG and not using patch queues, you&#x27;re doing it wrong. Just sayin&#x27;
评论 #6752407 未加载
riannucciover 11 years ago
Author&#x2F;thread starter here: Really didn&#x27;t think this post would have generated as much interest as it did when I created it... :D<p>It&#x27;s a fairly enlightening thread though. Mad props to Martin for a fantastically thoughtful reply!
评论 #6753434 未加载
eddiegrovesover 11 years ago
Mercurial&#x27;s changeset evolution sounds really powerful and seems to address the &#x27;git rebase and force push&#x27; problems that can occur.
评论 #6752791 未加载
cbhlover 11 years ago
Part of me wonders whether this is an instance of &quot;The Magpie Developer&quot;[0]. I know that I personally prefer git and bzr over cvs and svn, but just ten years ago, people were all talking about how Linux had just switched to BitKeeper.<p>I also suspect that rather than having a bikeshed-esque argument about switching between one DVCS and another, we can come up with technical solutions to enable everyone to work together. For example, when I was interning at Facebook two years ago, git-svn was used extensively to let the rank-and-file employees work with git, while still allowing chuckr to deploy off of SVN.<p>For mercurial and git, there are services like Kiln Harmony[1] and hg-git, too.<p>[0] <a href="http://www.codinghorror.com/blog/2008/01/the-magpie-developer.html" rel="nofollow">http:&#x2F;&#x2F;www.codinghorror.com&#x2F;blog&#x2F;2008&#x2F;01&#x2F;the-magpie-develope...</a><p>[1] <a href="https://secure.fogcreek.com/kiln/" rel="nofollow">https:&#x2F;&#x2F;secure.fogcreek.com&#x2F;kiln&#x2F;</a>
oleganzaover 11 years ago
&quot;The local revision numbers play no role here -- btw, they&#x27;re just an (arbitrary) ordering of the commits in your local repository. No magic there.&quot;<p>I disagree. Mercurial is famous for its &quot;simple&quot; revision numbers that differ between repositories. These revision number <i>are</i> magical as they can suddenly change when you merge some branches and older commits get pulled into your history. Since mercurial and git are mostly about collaboration, non-stable identifiers can be very confusing.
评论 #6756235 未加载
评论 #6754066 未加载
MikeTLiveover 11 years ago
Ive been using perforce&#x2F;p4 since 97. the last 8 years have been coupled with P4V and the eclipse plugins. My workflow is virtually identical to the much offered Git branching model [0]. Turn it -90deg with time left to right. Rename &quot;develop&quot; to &quot;trunk&quot;. and think of &quot;master&quot; as being the release labels. release and feature branches are created from the build label of the previous release needing special changes that can not just go into trunk or when we want to do a minimal patch-only release. a developer makes local copy of the portions of the trunk they want&#x2F;need. the server knows who has what opened for edit&#x2F;add which makes checkins fast. only the change must go in. same for regular update of my local workspace. we rarely have people editing the same exact file and if we do its a simple resolve in P4V during your commit or integrate activity.<p>So far, there are FEW benefits i see to using, or switching to, GIT: LOCAL REPOSITORY - I have the whole repo for what i am working on so can work remote easier LOCAL VERSIONING - I can create lightweight local branches that duplicate only what is required without resync of my local repo POPULARITY - all the cook kids are using it so lots of ops utilities now are built expecting it to be there under the covers.<p>I can live without the LOCAL benefits. I have for 8 years. I worry about the third - popularity vs. merit.<p>Where are the concrete comparisons showing all the features and functions of these solutions side by side and how they compare for a student, startup, or enterprise?<p>EDIT: found a newer perforce:git comparison on the perforce site[1]. The LOCAL REPO&#x2F;VERSIONING is available with P4SANDBOXING.<p>I suppose modding me down is appropriate since i picked up on the POPULARITY aspect of the discussion and don&#x27;t have any Hg experience. However, it seems these discussions just keep happening and there is no one-true-solution or approach. they each have merits and faults. it will be the careful consideration of these that leads to your own solution implementation. The popularity of GIT appears to be its strongest argument.<p>EDIT2: located a GIT-v-Perforce on SO.[2]<p>so many of the diffs, however, have been met with sandboxing<p>It really appears the strength is in popularity - everyone else uses GIT so you should too…<p>[0]: <a href="http://nvie.com/posts/a-successful-git-branching-model/" rel="nofollow">http:&#x2F;&#x2F;nvie.com&#x2F;posts&#x2F;a-successful-git-branching-model&#x2F;</a> [1]: <a href="http://www.perforce.com/sites/default/files/pdf/perforce-git-comparison.pdf" rel="nofollow">http:&#x2F;&#x2F;www.perforce.com&#x2F;sites&#x2F;default&#x2F;files&#x2F;pdf&#x2F;perforce-git...</a> [2]: <a href="http://stackoverflow.com/questions/222782/git-vs-perforce-two-vcs-will-enter-one-will-leave" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;222782&#x2F;git-vs-perforce-tw...</a>
评论 #6752175 未加载