14 ms·
Mercurial 2.9 released
- notwedtm 13y agoI would be interested in hearing from people who are using hg still. What is the reasoning? Do you see something in hg that the rest of us don't? Are there specific features of hg that git doesn't have?
- isxek 13y agoSpeaking for myself: the one specific thing I use every now and then in Mercurial is "hg serve" command. It allows me to serve up my changes to others in an ad-hoc way without needing to set up a repo in the usual places (Bitbucket, Github, etc.). If one needs to set up a local repo hosting service for internal use in a .NET company, there's SCM Manager (http://www.scm-manager.org/ http://www.scm-manager.org/), which is free, supports both Hg and Git, and (IMO) pretty easy to put up on a Windows server. I have not tried others that use purely Git, though, and I've never tried setting SCM Manager up on a Linux server. Personally, I have no problem if the whole team decides to use Git instead of what we're using now (TFS), but most of them, if not all, avoid the CLI like a plague. Even with excellent GUI frontends like Git Extensions and SourceTree.
- yapcguy 13y agoSourceTree seems to get slower and slowerespecially if you have submodules and lots of branches. Not sure why. Any good alternatives out there?
- isxek 13y agoIf you're using just Git, have you tried Git Extensions (https://code.google.com/p/gitextensions/ https://code.google.com/p/gitextensions/)? We don't use any submodules where I work, so I've never tried it with that.
- the_mitsuhiko 13y ago> Speaking for myself: the one specific thing I use every now and then in Mercurial is "hg serve" command. It allows me to serve up my changes to others in an ad-hoc way without needing to set up a repo in the usual places (Bitbucket, Github, etc.). You can do the same in git: git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/ or git daemon --verbose --export-all --base-path=. --reuseaddr .
- mahmoudhossam 13y agoOr you can use git instaweb instead?
- lttlrck 13y agoOr SSH
- isxek 13y agoAFAIK, this does not work with Git in Windows. I will try it at home where I have Lubuntu and see. (If it works, I'll make an alias for it.) Thanks.
- anton_gogolev 13y ago> If one needs to set up a local repo hosting service for internal use in a .NET company, There's also (shameless plug follows) HgLab ( http://hglabhq.com/ http://hglabhq.com/ ).
- isxek 13y agoI was supposed to try this out after SCM Manager, but our IT admin has not replaced the server I was using after it broke. If I ever get access to one again, I'll try it.
- meritt 13y agoWe use hg because bitbucket.org offered free private repos (no git back then) and it completely meets our needs. I'm also not familiar enough with git to know what benefits it provides over mercurial.
- erichurkman 13y agoMozilla does. It's been discussed numerous times on mozilla.dev mailing lists [1], with a lot of great discussion about it. [1] https://groups.google.com/forum/#!topic/mozilla.dev.platform/k1MW06xRYPo https://groups.google.com/forum/#!topic/mozilla.dev.platform...
- clarkevans 13y agoFacebook does as well. https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ https://code.facebook.com/posts/218678814984400/scaling-merc...
- nilved 13y agoMercurial isn't the terrible DVCS that people left for greener git pastures; indeed it's the opposite: GitHub is why git won, and people are still learning how terrible git is and how awesome Mercurial is. They don't "still use" Mercurial, they "still use" git. Mercurial has a great API. git has a terrible API. Mercurial is a joy to extend in Python. git is impossible to extend to any meaningful degree and is a terrible mess of Perl, shell script and C. git is a hack and Mercurial is the future.
- yapcguy 13y agoI use both. I dont think Git 'won' but it is more popular. I suspect many git users dont even know why they use git except because they were told to, they probably never tried hg or know anything about darcs, bitkeeper, etc.
- leobelle 13y agoI like git because it stores objects, not diffs and you can recover from almost anything with reflog.
- anton_gogolev 13y ago> I like git because it stores objects, not diffs Now _that's_ a reason to pick a VCS! Would you drop Git if you found out that this is not true [1]? [1]: http://git-scm.com/book/en/Git-Internals-Packfiles http://git-scm.com/book/en/Git-Internals-Packfiles
- tomlu 13y agoI see where he is coming from even if the wording is ambiguous. Git presents the abstraction of storing objects, and diffs are inferred. The exact implementation is beside the point.
- tonfa 13y agoBut then mercurial is the same, the abstraction is about file content, the diff compression is an internal detail of the storage format like packs.
- reactor 13y agoI've been using both Git and Hg for different projects and found with recent releases (2.6 onwards) mercurial getting quite fast. I think hg commands are more sane and exposes only what it's required by users. Also there isn't anything you can do with hg but can't do with git and vice versa, if you look closely. These are just the tools that must help you get going, so if you/co-workers are comfortable with git, there is no reason to switch to hg. (and from hg to git as well). They both have pros and cons so we will never find THE BEST dvcs. Don't bother too much (they both are super capable) rather focus on problems that need more attention.
- toggle 13y agoFor me, it's: 1. The queues extension. 2. A bazillion other extensions. 3. The source code is pretty reasonable -- even mortal humans can contribute and write their own extensions. I've found the queues extension to be really useful. It's like having multiple staging areas, which will later become multiple commits. I tend to change too many things, and then remember that I need to create specific commits. Queues makes that possible. I haven't found a good way of doing that in git, although I still use git every day without any big problems.
- Skinney 13y agogit stash? Actually, you can also just create a branch, commit your work (instead of hg qpush) and just use git rebase --interactive when you want to "finalize" your work.
- jordigh 13y agoThe exact same workflow works pretty much the same way in hg, with shelve (stash) and histedit (rebase -i). There is even a better way nowadays with hg evolve, but it's still beta.
- Skinney 13y agoHows the backup story with Hg nowadays? Git uses an immutable storage solution, so rebasing or other commands to alter history doesn't delete anything. Hg doesn't have the same architecture, so how does undoing histedit work? Genuinly interested, not trying to start a flamewar.
- mamcx 13y agoI consider hg far more easy to use than git, specially for the most used commands (status, fetch, push). I need to check the docs about how do the damm push each time with github. My only gripe with mercurial? That everyone else asume git.
- Skinney 13y agocheck the docs? What is so hard to remember about "git push"?
- jordigh 13y agoThis: jordi@Iris:~$ git help push | wc -l 544 jordi@Iris:~$ hg help push | wc -l 50
- Skinney 13y agoThis is due to Git's tight integration with regards to branches and namespaced branches though isn't it? Hg push isn't aware of bookmarks as far as I know, so Git has more to explain compared to Hg, where lightweight branches are a plugin. Or am I wrong on this?
- jordigh 13y agoWow. I use Mercurial so much, that I forget that some people have no idea about it at all. No, hg bookmarks are not a plugin, although they were like four years ago. Hg push has this to say about bookmarks: If -B/--bookmark is used, the specified bookmarked revision, its ancestors, and the bookmark will be pushed to the remote repository. That's all it has to say. If you do "hg help bookmarks", you'll get more options about bookmarks, but they're not immediately relevant to pushing.
- Skinney 13y agoIt is still a plugin, it's just bundled/installed by default. I've worked with Mercurial for the better part of a year, I'm not clueless about it. But yeah, since branches/bookmarks are an integral part of how you work with Git, you also have more options regarding branches/bookmarks in several git commands. Git allows you to push a local branch to a remote branch of a different name. This is helpfull when you're pushing to different remotes, and the some of the local branches should map to master on different remotes. But this of course requires more information to stand in git pull's documentation. There are, of course, other features as well. Just because git push has some 'advanced' featues, doesn't make the actual push command difficult to understand though. Most of the time you just use 'git push', same as Mercurial, git just allows you to do more with git push than what Mercurial allows you to.
- grey413 13y agoFour reasons, all dating back to when I started using VC. 1) The GUIs were better, especially on windows. I think that gap has closed some in the last few years, but I think hg still has an edge. 2) Bitbucket offered free private repos and was hg only when they started out 3) The command line semantics were less imposing 4) I happened to find some really good introductory literature for hg. I was a very, very green developer at the time so all of these points mattered a lot.
- dscrd 13y agoI got used to how hg works and now, in comparison, git always confuses the hell out of me with its unintuitive commands and odd walls-of-text errors.
- benrhughes 13y agoAt work we have non-devs (mostly scientists) using our repos, and I didn't want to have to teach them git. Mercurial is much easier to pick up IME. With the right plugins enabled, there's not much I miss day to day compared with git. At home I still use git. In part because of github, in part because I like some of the default behaviour better, and in part because being forced to learn how it works to dig my way out of holes broadens my understanding of DVCSs in general.
- imakesnowflakes 13y agoMercurial gives you complete DAG of history with enough tools (revsets) to filter and view it in any way. Git lets you peep into the DAG of history through small windows, called 'branches'. This was the biggest annoyance for me when I tried git. You cannot even ask git for the id of the currently checked out revision, ie if you are not on a branch tip. And yes, the inconsistent cli is a big turnoff too.
- toggle 13y agoThe only bug here that was "bugging" me was that issue 3857, where you had to specify the username in your config rather than being able to just do it on the fly in the command. Nice to see the rest getting fixed, though. While we're talking about Mercurial (which is rare), the crecord extension may be getting Windows support soon -- there's a Windows fork, and the original author wants to merge it in. Crecord is a command-line interface for choosing which specific lines to include in a commit. It's one of the reasons why I feel hg is very useable from the command line, even if you aren't a command-line wizard. crecord: https://bitbucket.org/edgimar/crecord/ https://bitbucket.org/edgimar/crecord/ windows fork: https://bitbucket.org/jmb/crecord https://bitbucket.org/jmb/crecord
- sdfjkl 13y agoVery glad to see this in between all the git monoculture. Yes, GitHub is kind of nice for some things, but git really isn't.
- pekk 13y agoWhat a contentless comment. One might just as well flatly claim that mercurial isn't nice for anything.
- ender7 13y agogit's CLI design is byzantine and inconsistent, with terms that are both overloaded and underloaded (many commands do multiple, unrelated things while at the same time many common tasks do not have commands). It's very easy for newcomers to place their local repo into a limbo or failure state that they can't get out of without consulting a git guru. git's error messages and man pages are written for its developers, not for its users. git's overall CLI structure maps poorly onto its underpinnings, half-hiding parts and not explaining the rest. Pushing and pulling have really bizarre default behavior that easily confuse those who have not carefully studied how they work. git is extremely powerful and is, buried underneath its abysmal UI, a thoughtful and elegant work of engineering. However, as a product it's incredibly difficult to explain to other people. Until you've invested a thoroughly unnecessary amount of time learning its gotchas, quirks, and vagaries it is a monumental pain in the ass to use. (Don't get me wrong, I use git all the time and appreciate its power. I just wish Linus has asked someone else to design the CLI.)
- pbreit 13y agoThe monthly updates always scare me a bit for version control. Is that really prudent?
- ngoldbaum 13y agoThey're actually very big on backwards compatibility. It's quite straightforward to work with repositories created by old mercurial versions on and communicate with mercurial installs with different versions. The only thing that won't work is features that are only in the newer version. The real effect of the monthly releases is that bugs get cixed in releases, new features get added, and I get to regularly see all of the awesome activity going on in the mercurial world.
- Silhouette 13y agoThis is something that has always made us a little nervous about updating here as well. Do you know whether the underlying data structures for repositories are generally maintained with both forward and backward compatibility? Edit: For anyone else interested, I finally found the magic search term I never had before, which led me to this page about upgrading and compatibility: http://mercurial.selenic.com/wiki/UpgradingMercurial http://mercurial.selenic.com/wiki/UpgradingMercurial and this page about potentially breaking changes where they do occur: http://mercurial.selenic.com/wiki/UpgradeNotes http://mercurial.selenic.com/wiki/UpgradeNotes The short version is that older and newer Hg clients and servers and mostly interoperable in all directions, but with a few specific caveats that are worth reading before you upgrade anything. There is also the ability to explicitly change the underlying repository format for compatibility reasons if you need to.
- tonfa 13y agoThe monthly releases are bugfix only. New features are released every three months (and release process has an extended freeze where only bug fixes are allowed for a couple of weeks before the release)
- philtar 13y agoI rarely have geeky conversations with anyone (since I don't know any and that is why I hang out here) but I'm genuinely curious: Why is git more popular than hg? I tried both and hg was generally easier (for me) to pick up. I'm sure it's not JUST because of github.
- nilved 13y agoIt isn't _just_ GitHub, but it's 90% GitHub. And 10% Torvalds. The important part is that it's 0% actual, useful reasons.
- anton_gogolev 13y agoLinus is the reason, I guess. I tend to think that if Git was written by somebody other than Linus, it wouldn't have gotten so popular. After all, Git was not even envisioned as a VCS [1], and all the usual VC-related functionality has been bolted onto it without a single design vision, which is why we have this clusterfuck of a CLI now. Sometime after that there was GitHub. [1]: http://marc.info/?l=linux-kernel&m=111288700902396 http://marc.info/?l=linux-kernel&m=111288700902396
- harshreality 13y agoSpeed and workflow, previously. Mercurial has made up most of the difference in speed, so now git is better for some things ([temporary] topic branch workflow and history clean-up of such branches before merge is more likely to be used by git committers even if hg technically has that now, speed in a few cases, mindshare) while mercurial is better for other things like syntax, or dealing with gigantic repositories -- like Facebook's[1], but only because Facebook engineers decided that functionality was easier to add to mercurial than to git. [2] https://news.ycombinator.com/item?id=7019673 https://news.ycombinator.com/item?id=7019673
- dhimes 13y agoI think hg has both temporary (bookmarks) and permanent (branches) branch workflow out of the box now- and has for a while.
- polarix 13y agoI would LOVE to use mercurial. If the concept of a backup bundle was completely removed. When I amend a commit with git, I don't put myself 20 minutes away from recovering that pre-amend commit. If hg comes up with some way to have a flat namespace like git, (ideally with a reflog) I'll be back.
- dhimes 13y agoI wish I knew what you are talking about- it sounds useful. I use mercurial- I've never used git.
- anton_gogolev 13y agoThat whole "back up a part of history so that you could undo stuff later" will be gone as soon as Changeset Evolution [1] is ready. An when it's ready, it will be tremendous. [1]: http://mercurial.selenic.com/wiki/ChangesetEvolution http://mercurial.selenic.com/wiki/ChangesetEvolution
- jgalt212 13y agoHas anyone used this (or something similar)? the Hg-Git mercurial plugin http://hg-git.github.io/ http://hg-git.github.io/
- egh 13y agoYes, it works great. If you prefer hg you can push your code to github and get pull requests, etc. from people who only know git.
- gtaylor 13y agoI've tried to use it to mirror an old Hg repo in git, but ran into some really weird errors with branches in Hg causing vague errors. I couldn't get any help on the mailing list, and I ended up giving up right as the project said "Forget it, let's just move to Git." This was about six months ago. I don't have the error message. I got the impression that the documentation and the support were pretty sparse for this plugin. Though, it may work well for more simple Hg repositories, I guess.
- crdoconnor 13y agoI used this for a while to push from hg to heroku, but it screwed up in a major way at some point and left the repo essentially useless.
- egork8n 13y agohg-git works flawlessly as long as you are using hg-git _and_ python-dulwich from their repos heads. Their releases on PyPI are always somehow out of date.
- eperoumal 13y agoFor all the reasons mentionned in this thread (interface consistency, performance, ...) hg is far superior to git. But, as long as git would get the cool tools - namely, gitlab / gitlab-ci - people won't bother looking at hg. I started a new project with collaborators a month ago, we had to chose git mainly because of gitlab, as it would ease the process of managing consistently our codebase in a visual and simple way, not to mention the continuous integration goodness that comes with gitlab-ci. There is, to my knowledge, no close equivalent for hg.
- ergo14 13y agothere is rhodecode.com, It's very nice product and I use it on a daily basis.