9 ms·
Python now uses Mercurial
- js2 16y agoI was confused why this was news since the decision was made two years ago: http://mail.python.org/pipermail/python-dev/2009-March/087931.html http://mail.python.org/pipermail/python-dev/2009-March/08793... But I see from http://www.python.org/dev/peps/pep-0385/ http://www.python.org/dev/peps/pep-0385/ that it's taken that long to migrate away from svn.
- geekam 16y agoBut why are they using Mercurial and not Git? I want to what are the advantaged for them to choose Hg.
- koenigdavidmj 16y agohttp://www.python.org/dev/peps/pep-0374/#why-mercurial-over-other-dvcss http://www.python.org/dev/peps/pep-0374/#why-mercurial-over-... Basically, they wanted a tool that was equally usable on all platforms, which excluded Git on Windows. They also wanted something written in Python, of course, although they would have sacrificed that in the interest of pragmatism.
- pestaa 16y agoIn all fairness, I'd like to point out it's quite possible to make Git work on Windows. If one can adjust the path, it is also reachable through the same command line Windows folks are used to.
- AlecSchueler 16y agoAs far as I know, Git was a lot more awkward to use on Windows when they started discussing this move a few years ago.
- pnathan 16y agoI've found git to be a ---- nightmare to use. Part of that is inexperience, part of that its UX is a turd compared to hg.
- tghw 16y agoQuite possibe to make work and works equally well are not the same thing. Mercurial is a breeze to install on Windows and any other platform, and with TortoiseHg's recent move to Qt, full cross-platform GUI support is also there (right now there are no Mac installers, but there should be some soon).
- mckoss 16y agoThe last time I looked, Git on Windows required you use a different shell than the native Windows command shell (not that I'm a fan of the crappy Windows shell, but it does make it more awkward and feels less "native").
- john2x 16y agoI think it's called Git Bash. It isn't so bad though, you get some working Unix commands with it. Come to think of it, I think it's better than CMD, to an extent.
- cagey 16y agoI've been using MsysGit (Windows) for about 18 months as a "local vcs" wrapper around a sucky vcs (Accurev). Until the most recent MsysGit release, I used the "git bash" shell exclusively: for each Accurev workspace, I had a CMD shell where I ran builds in the w/s, and a git bash shell where I operate git for that w/s. This was mostly satisfactory (being able to write true bash scripts to automate git a tiny bit was cool), but when working with sometimes a dozen or more workspaces, it can get a little time consuming to locate the respective shell's mate. Anyway, MsysGit has mostly worked quite nicely for my limited purposes. However I am now evaluating hg as a possible replacement for Accurev (I'm running a quasi-import over the weekend). I'm also running a git import in parallel (mostly to compare repo size growth over time), and to do that (in lockstep) I'm running git from a CMD shell; so far I've not had any problems using git in CMD (wait, git's interpretation of the %EDITOR% environment variable in CMD is broken). Why hg, after all my experience with git? As mentioned elsewhere in this discussion: MsysGit (git for Windows) is like a "second class citizen"; it's pretty clear that the git creators have a negative religious attitude about Windows, thus expecting equal functionality and support on Windows is folly. The MsysGit discussion threads reflect a shoestring operation, with overwhelmed developers solely scratching their own itch (fair enough as far as it goes). Whereas hg treats Windows as a first class platform (presumably because it was designed and built with that in mind). I still like git's branching feature (which is why I chose it initially over hg), but between hg and git, hg is IMHO the only pragmatic choice for a "Windows shop".
- Legion 16y agoMost people that use SVN on Windows seem to use TortoiseSVN instead of a command line. Similarly, most Windows developers that I encounter who run Git just use TortoiseGit. (And TortoiseHg for Mercurial for that matter). The whole "Git on Windows" issue? Completely overblown.
- cageface 16y agoIf nothing else it's because Mercurial itself is written in Python.
- random42 16y agoNot true. While mercurial being written in python is noted[1] , it is made explicitly clear, its not the reason behind the main selection of Hg as the version control. [1] - http://www.python.org/dev/peps/pep-0374/#why-mercurial-over-other-dvcss http://www.python.org/dev/peps/pep-0374/#why-mercurial-over-...
- HerberthAmaral 16y ago"First, git's Windows support is the weakest out of the three DVCSs being considered which is unacceptable as Python needs to support development on any platform it runs on." This is FUD! The support for git on windows is pretty good and there is nothing obstrusive in it. You can use git on Windows fairly well. Sad to see this kind of comment written by smart people.
- sixtofour 16y ago"Last-Modified: 2010-01-07 23:33:01 +0100 (Thu, 07 Jan 2010)"
- wzdd 16y agoThe PEP was written in 2008.
- deleted 16y ago[deleted]
- Locke1689 16y agoGit's Windows support is clearly the weakest since it requires either MinGW or Cygwin. The platform itself is unoptimized for native Windows performance. It may not be terrible but it's certainly the weakest of the DVCSs, as they say.
- xi 16y agoSee http://www.python.org/dev/peps/pep-0374/ http://www.python.org/dev/peps/pep-0374/ for the rationale; but keep in mind it's more than two years old so some of the criticisms may not longer apply.
- null_ptr 16y agoWhy would Git be any better? They're both tools that ultimately accomplish the same thing.
- Peaker 16y agogit rebase -i, git reset --hard, git checkout <any-refspec>
- masklinn 16y agohg histedit, hg revert, hg update -r{any revspec}
- Peaker 16y agoI meant "git reset --hard" as a prefix for useful <refspecs>. Can hg set the current branch to point anywhere in time? Does histedit do exactly what "rebase" does? Does it also work with "--onto" and other rebase features?
- viraptor 16y agoRegarding resetting: hg up -C <some ref> will give you a clean checkout of that ref, discarding any local changes.
- jbellis 16y ago(Sorry about the accidental downvote. Arrows + phone got me again.)
- elehack 16y agohg branches are entirely different from git branches, so resetting them in that way doesn't make sense. The closest approximation - bookmarks - can indeed be reset (hg bookmark -f). histedit does a variety of things; I'm not sure if it covers all of rebase's branches. Mercurial does also have a rebase facility now as well.
- sid0 16y agoBecause Guido has a taste for good UI. </troll>
- viraptor 16y agoTrolling aside, that's the only reason I chose hg over git for my projects -> sane approach to the UI. With both of them having more or less the same functionality, UI of git is... inconsistent at the very least.
- tghw 16y agoI find the way your phrase that question interesting. Git and Mercurial are nearly identical in terms of functionality, to the point that converting back and forth between them is pretty trivial. (Example: here's Git's repository in Mercurial https://mirrors.kilnhg.com/Repo/Mirrors/From-Git/Git https://mirrors.kilnhg.com/Repo/Mirrors/From-Git/Git) The only real difference between the two are the ecosystems. Mercurial, being written is Python, is very portable and easily extensible. I feel like, because of that, the tools for Mercurial are better. Git has GitHub, and the incredible open source community they've developed there. * Note, the rainbow road is due to one of the few differences between Git and Hg: Hg does not allow octopus merges, so the conversion turns them to a sequence of two at a time merges. Also, in the interest of full disclosure, I'm one of the devs on Kiln, so I'm certainly biased towards Hg.
- js2 16y agooctopus merges are rare in the git.git repo: $ git rev-list --merges --parents --tags | awk '{print (NF-1)}' | sort | uniq -c 4409 2 22 3 5 4 3 5 1 6 So there's been a total of 31 octopus merges compared to 4409 typical two-parent merges.
- jrockway 16y agoHow many Octocat merges have there been?
- burgerbrain 16y agoOn the other hand, roughly an entire 2% of merges on linus's linux tree have been octopus merges. Hardly something to scoff at. 5 10 6 11 5 12 3 13 2 14 1 18 14592 2 1 20 1 21 1 24 129 3 1 30 50 4 25 5 21 6 13 7 18 8 7 9
- lloeki 16y agoRelative occurence numbers don't say much about the need for octopus. Maybe they're rare but when the need arises it proves to be an invaluable feature.
- alok-g 16y agoInteresting to note that bzr got close to mercurial in the votes in spite of this being bzr version 1. Version 2 is much improved in speeds (comparable to git/hg).
- wh-uws 16y agoI myself am quite partial to bzr espeically since tortoise-bzr uses my favorite diff tool by default http://doc.bazaar.canonical.com/explorer/en/guide/qbzr/qdiff.html http://doc.bazaar.canonical.com/explorer/en/guide/qbzr/qdiff... I would be interested to know about other's impressions of bazaar and why most people seem to share the same sentiment towards it as those at pycon that year While no one said they did not want bzr chosen, no one said they did either.
- prog 16y agoI have been using bzr for 2+ years now. For personal projects I am quite happy with bzr+launchpad. At work, we have been using bzr on Linux. The move from 1.x to 2.x brought in significant performance and memory improvements.
- alok-g 16y agoI did detailed evaluation of bzr, git, hg and svn. And found bzr to be good too (at least equally good). Most comparisons I found online have been too old to be using older version of bzr which was very slow in comparison. I am still unclear on the impact of a "branch" being the key concept in bzr as opposed to "repository" in git/hg. Git's support on Windows has improved considerably (although I could not find a good GUI). So I rather find not much reason to use Hg!
- jarin 16y agoIt's interesting that each major web language seems to have paired off with a different VCS: - Python + Hg - Ruby + Git - PHP + ...SVN?
- strmpnk 16y agoThe C Ruby implementation is actually on subversion with an official git mirror. Granted, most Ruby projects are hosted using git repositories these days.
- burgerbrain 16y agoPHP + ...SVN? Gotta say, they deserve each other.
- there 16y agoand OpenCOBOL uses CVS http://www.opencobol.org/ http://www.opencobol.org/ (http://sourceforge.net/projects/open-cobol/develop http://sourceforge.net/projects/open-cobol/develop) maybe a language older than that still uses RCS
- barake 16y agoThe ERP where I work wraps RCS with a bunch of scripts. It's used for source control (of course) but also schema migrations, source generation, and a million other things I've checked files out that were last modified before I was born.
- abredow 16y agoBecause they both have widespread adoption?
- burgerbrain 16y agoBecause both are commonly perceived as a step backwards from the current state of the art, but more importantly because it's good sport to make cheap jabs at both of them :P
- egor83 16y agoAnnouncement in Python-Dev: http://mail.python.org/pipermail/python-dev/2011-March/108738.html http://mail.python.org/pipermail/python-dev/2011-March/10873...
- vimalg2 16y agoGit and Hg accomplish essentialy the same thing. The platform support and tool/utility support for Mercurial on windows in important to note. I decided to choose Mercurial as the VCS for my 'work'. This was a team that had no prior exposure to VC before. And works in a mixed environment. Hg follows the 'one true way' philosophy of Python; so there's just a single command to learn for each task. Plus, Bitbucket's new Free pricing plan for tiny teams convinced me to go with it for online hosting(rather than roll our own hg server over vpn) Though, If I had to choose a host/vcs for 'my awesome FOSS community project', it would go on Github.
- woogley 16y agoThis is basically where I stand as well. Git has no real appeal for me, but GitHub does. Plus, with the ridiculously easy hg-git[1] tool, I'm able to take advantage of GitHub while staying in my Hg comfort zone :) [1]: http://hg-git.github.com/ http://hg-git.github.com/
- chousuke 16y agoHeh, I'm the exact opposite. I use a hg-to-git tool to access hg repositories, because I'm much more comfortable with git. I often hear people claiming hg is easier to use and has a better interface, but every time I have to use hg it rubs me the wrong way because I can't use it like I use git :/ (In particular, I find hg branches needlessly complicated and cumbersome compared to git's "just a pointer" model) I guess between the two you'll end up using the one you first bother to learn beyond memorising basic commands.
- cageface 16y agoSame. Branches are a dealbreaker.
- megaman821 16y agohg bookmarks are the equivalent of git branches for the most part. Check out those next time you use mercurial.
- 16y ago
- epynonymous 16y agomakes sense since mercurial is written in python, it's like eating your own dogfood in some senses.
- tzury 16y agovia Guido (http://twitter.com/#!/gvanrossum/status/44169137240551424 http://twitter.com/#!/gvanrossum/status/44169137240551424) For those asking "why not git", read http://www.python.org/dev/peps/pep-0374/ http://www.python.org/dev/peps/pep-0374/