Potential for error when importing from HG to Git

I haven't yet determined the root cause of the problem, but for whatever reason when attempting to pull into one of my HG repos from a Git mirror it failed due to bad metadata in the Git commit message.

The commit message in questions:
    commit 59357b920e7b40a0b5719771a101b2ec6337bf26
    Author: Carl Meyer <carl@oddbird.net>
    Date:   Tue Sep 21 17:57:28 2010 -0400
    
        add .gitignore for git mirror work; can be removed later
        
        --HG--
        branch : conditional-questions

Obviously this syntax is actually correct, but when it was being processed by extract_hg_metadata() it would fail. Adding some debugging to the method I was able to determine that after the message.split("\n--HG--\n", 1), the metadata was instead coming through as:
    branch: conditional-questions

This obviously causes the next split (command, data = line.split(" : ", 1)) to fail. My change fixes this issue and allowed the pull to proceed as it should, though I still can't explain the actual cause of the problem.