LWN.net Logo

Mercurial 1.9 released

Version 1.9 of the Mercurial distributed source code management system is out. New features include a functional file set matching language, a new command server mode, and more; see the release notes for details.
(Log in to post comments)

Mercurial 1.9 released

Posted Jul 2, 2011 22:38 UTC (Sat) by robert_s (subscriber, #42402) [Link]

Now, I've been using mercurial for my projects for a while now, but I only had the "this is where it's at" experience the other day when I realized that rather than running a hacked version of an external dependency of my app, I could create a git subrepository of the dependency's github project in my (work, proprietary app) mercurial repository, make the needed improvements, and send a pull request to the upstream project. And mercurial will keep everything in order, keeping our proprietary bits proprietary.

This is how software development is supposed to be.

Mercurial 1.9 released

Posted Jul 3, 2011 22:57 UTC (Sun) by dgm (subscriber, #49227) [Link]

What's wrong with just having a git clone of your external dependency? It's that you can do it with Mercurial alone, or I'm missing something?

Mercurial 1.9 released

Posted Jul 4, 2011 13:36 UTC (Mon) by robert_s (subscriber, #42402) [Link]

The great thing about the integration with mercurial is your changesets will record the fact that mercurial revision xyz is against git revision abc. Which is really important if you're refining interfaces between modules all the time.

Mercurial 1.9 released

Posted Jul 4, 2011 15:32 UTC (Mon) by JohnLenz (subscriber, #42089) [Link]

Also useful for bisecting. If the interface to the library changes it is hard to reliably bisect without mercurial tracking which revisions match.

Mercurial 1.9 released

Posted Jul 4, 2011 17:02 UTC (Mon) by cmccabe (guest, #60281) [Link]

check out "git submodule"

Mercurial 1.9 released

Posted Jul 5, 2011 15:35 UTC (Tue) by daglwn (subscriber, #65432) [Link]

Git submodule is broken because of the detached head operation. Use git-subtree instead.

Mercurial 1.9 released

Posted Jul 5, 2011 17:25 UTC (Tue) by jrn (subscriber, #64214) [Link]

What's wrong with detached HEAD operation?

Here are some other issues that a person might run into: https://github.com/jlehmann/git-submod-enhancements/wiki/
Alas, neither git-submodule nor git-subtree is perfect, and even worse, I don't think that any one of them is better in all cases than the than the other.

Mercurial 1.9 released

Posted Jul 5, 2011 20:52 UTC (Tue) by daglwn (subscriber, #65432) [Link]

With detached HEAD, it's too easy to lose changes.

I find the restriction of not committing within the subproject very annoying. I don't know if that's a consequence of detached HEAD or not. git-submodule shouldn't allow it if it doesn't work. git-subtree doesn't allow it because the "submodule" effectively becomes part of the whole repository.

I'm curious what you've found restrictive about git-subtree. I've been using it for about a month and it's done everything I need. I'm particularly curious as we're evaluating source control tools at the moment and I'd like to have as much relevant information as possible. Thanks!

Mercurial 1.9 released

Posted Jul 6, 2011 4:10 UTC (Wed) by nix (subscriber, #2304) [Link]

With detached HEAD, it's too easy to lose changes.
Only if you turned off the reflog (don't do that) or don't know about it ('git log -g', there, that's solved), or don't care about whatever you did on the detached HEAD for so long that it expires (i.e. months, minimum).

Mercurial 1.9 released

Posted Jul 6, 2011 5:40 UTC (Wed) by bronson (subscriber, #4806) [Link]

All it takes is rolling the parent repo back to before the submodule was added. Now it's untracked. It becomes pretty likely that someone will do a git clean -df or rm -rf and now the reflog is gone too.

Submodules are great for a single developer who never merges or goes back in time. They are full of thorns for everyone else.

Mercurial 1.9 released

Posted Jul 6, 2011 0:13 UTC (Wed) by cmccabe (guest, #60281) [Link]

git-subtree does look interesting. Not having to call "git submodule init" is a big bonus and one I wish could somehow be implemented in git-submodule.

Mercurial 1.9 released

Posted Jul 6, 2011 20:18 UTC (Wed) by robert_s (subscriber, #42402) [Link]

For the record, I'm not claiming git can't do subrepositories - I'm just saying how I use mercurial's git subrepos.

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds