I just found a really useful way to do the double landings that we have to do if we want to land anything on the 1.9.1 branch right now. hg has this handy feature that will let you import from a url, which means it’s incredibly simple to take a changeset from mozilla-central, and then push it to mozilla-1.9.1:
- Figure out your changeset url for mozilla-central. For this example, we’ll use http://hg.mozilla.org/mozilla-central/rev/242894260a86.
- In your mozilla-1.9.1 tree, run hg import and pass in the previously obtained mozilla-central revision url, with a minor modification: change rev to raw-rev (so you’ll end up with http://hg.mozilla.org/mozilla-central/raw-rev/242894260a86
Assuming it applied cleanly, you now have that changeset as a local commit in your repo. You can now push like you always do. Happy landings!
9 replies on “Double Landings? No Problem!”
I think this feature is hg 1.1 only, so it will only work for those who’ve upgraded…
@Dirkjan
I thought so to (maybe it was because you said as much on irc – can’t recall), but It’s working for me with Mercurial 1.0 on my mac.
You can also use the transplant extension for this. Just stick “hgext.transplant = ” in the [extensions] section of your .hgrc, and then run hg help transplant.
Yeah, this works with hg 1.0.1 on Ubuntu as well. I also started doing “hg import -m … -u … https://bugzilla.mozilla.org/attachment.cgi?…”.
Only problem is you also need to import to mq to edit the commit message to include the approval.
@Mossop
I tend to not bother. It’s clear if you open the bug that something has approval or not. I also bet this works for hg qimport
Isn’t it part of the checkin rules to mark approvals for landings? I’m gonna get your privs revoked!
@Mossop
From tinderbox:
We also aren’t supposed to checkin on orange, and people land all the time with orange (even bad orange).
Looks like this doesn’t produce git-style diffs, which doesn’t help with adds/removes/renames etc.