Log in

No account? Create an account

Very pleased with myself - Journal of Omnifarious

Oct. 16th, 2005

08:03 pm - Very pleased with myself

Previous Entry Share Next Entry

Well, I've made a number of modifications to Mercurial that have not yet been reviewed and accepted. But, I've been using them now for awhile, and they appear to work pretty well.

Basically I added the '-r' option to clone, pull and push, both for local and remote repositories. This lets you specify a particular revision (or revisions, '-r' can be specified multiple times) you would like to pull in or push out.

This enables someone to pull in just a branch from some remote repository, or even just the changes leading up to a particular change and none of the ones after. This is great if you're a maintainer and want to just pull something specific from a contributors repository.

Previously this was done by the maintainer asking for the change in patch form, and the maintainer would apply the patch. This didn't handle renames or copies well. Additionally, it then gave the change a different id than the original author had for it. This led to the original author getting an extra branch containing their own change when they pulled from the main repository.

Trusted contributors could set up repositories of their own, and the maintainer would pull directly from them. But this was a little dicey as the maintainer would get every single changeset the contributor had published, whether the maintainer wanted them or not.

I'm hoping that this lowers the bar enough for the maintainer to pull changes even from contributors who haven't contributed anything before. Otherwise, the idea of a distributed SCM and the practice will deviate from each other in some significant ways. At least, when using Mercurial.

If anybody wants them, they can be found at http://hg.omnifarious.org/~hopper/bleeding-mercurial, and all of my repositories can be found at http://hg.omnifarious.org/~hopper

Current Mood: [mood icon] accomplished