Skip navigation

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:

  1. Figure out your changeset url for mozilla-central. For this example, we’ll use
  2. 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

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!


    • Dirkjan Ochtman
    • Posted December 11, 2008 at 16:03 (4:03 pm)
    • Permalink

    I think this feature is hg 1.1 only, so it will only work for those who’ve upgraded…

  1. @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.

  2. 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.

    • Dao
    • Posted December 11, 2008 at 19:04 (7:04 pm)
    • Permalink

    Yeah, this works with hg 1.0.1 on Ubuntu as well. I also started doing “hg import -m … -u ……”.

  3. Only problem is you also need to import to mq to edit the commit message to include the approval.

  4. @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

  5. Isn’t it part of the checkin rules to mark approvals for landings? I’m gonna get your privs revoked!

  6. @Mossop
    From tinderbox:

    Your checkin comment should include the bug#, a clear explanation of the fix, and reviewers.

    We also aren’t supposed to checkin on orange, and people land all the time with orange (even bad orange).

  7. Looks like this doesn’t produce git-style diffs, which doesn’t help with adds/removes/renames etc.

Comments are closed.