So here at Orbus, I've decided to move some things over to Mercurial for a bit to try it out. Generally, the whole user branch thing I talked about way back when we started wasn't working. Setting up each user branch was a huge pain, and merging large changes back and forth was almost impossible, even with a helper tool like svnmerge. Svn supposedly fixed this with 1.5, but if they did it the same way they did it in svnmerge, I'm not going to bother attempting to use it. Bidirectional merges from multiple branches just doesn't work with svnmerge, and I don't recommend attempting it. Mercurial, I'm hoping, will at least partially solve this problem.
So, we've been converting things over the past few days, and I have some initial impressions. First, the bad:
- Repository cloning on large repositories, even with the addons that allow windows to use hard links, is fairly slow. I wish mercurial allowed lightweight local branches that could be developed on, and then merged back into a working copy, all in the same directory. This is the git model of doing things. I understand why mercurial doesn't support it, I just kinda wish it did.
- I'm sad there's no rebasing. I would like the ability to do work in a branch, commit, say, 20 changes in that branch, and then rebase it all to one change in the main trunk. Again, I understand why it's not there, but it'd be nice to have.
- I'd like to be able to see who pushed what revisions to an upstream server. Having who made the changes is great, but I'd also like to see who pushed them. I'm not sure this data is available to mercurial though.
- All the interfaces need work. I would love graphical tools that could show branching and merging into various files. Not sure what other distributed software does for this, but it seems like a very hard problem.
- The internal branching system is extremely confusing, and I'm not sure merging single changes between branches will be any easier with Mercurial or not. Will have to see.
The good:
- Mercurial was really easy to set up, even integrating LDAP into the push permissions system. I like it when things are that easy.
- It makes collaboration with other programmers easier, just because of the way it works.
In general, I'm currently just using Mercurial like I'm using Subversion. The tiny bonus is now I can grab changes from other programmers, take a look at them and give comments, all without posting to a server, and that's really nice. Once I get some more experience, I'll make sure to hand out more impressions.

[...] use them to promote pre-push process. Right now, though, I quickly want to respond to a few of my initial impressions of [...]
To log the user who pushed a changeset I suggest you
- create file /etc/mercurial/hgrc:
[hooks]
incoming = pushhook
- create script /user/local/bin/pushhook:
#!/bin/sh
printf “\”%s\”\t\”%s\”\t\”%s\”\t\”%s\”\n” “$HG_NODE” “$USER” “$(date
-u)” “$(hg log –template ‘{desc}’ -r $HG_NODE | tr ‘\n’ ‘ ‘)” >>
.hg/pushlog
as a result you whould have a pushlog in every project’s .hg directory
A good suggestion for a quick fix without extensions, but not quite what I was looking for. A real solution would store the pushing user as metadata on the actual changes. Maybe have the name of the server, the date, and the user that did the push. That way we can see change 1-5 got pushed to the initial upstream by me, 6-7 got pushed by person X, then they all got pushed to the release server by person Y.
Also, the other problem is that I’d want to make sure that the LDAP username is used over the mercurial username.
Try the SonicHg extension:
http://kenai.com/projects/sonichg/pages/Home
It has a pushlog hook that gathers the data.
just an FYI mercurial 1.1 introduced rebase (rebase ext) and git-like lightweight branches (bookmarks ext).
Bookmarks are a nice step, but unfortunately they’re hardly an analog to git branches at this point, because they’re effectively local-only. It’s still a useful extension, because I can get convenient named branch-like behavior locally while being able to delete them, but remote, temporary branches in git are very useful and remain the biggest utility that I think it has over hg.
@ches bookmarks will be remote in the future.
You say:
The good:
Mercurial was really easy to set up, even integrating LDAP into the push permissions system. I like it when things are that easy.
Can you post how you configured apache/mercurial to authenticate with active directory?
@Alen I didn’t integrate with an AD server, but there are plenty of articles on using AD as an LDAP server out there.
Hi Jeff
Could you post how did you setup the mercurial server with the ldap backend? I’m not able to find such information until now, so it would help me a lot.
Thanks and keep it up