Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7738703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:20:08+00:00 2026-06-01T08:20:08+00:00

After solving countless problems with the hg-fast-export tool on Windows (from finicky python version

  • 0

After solving countless problems with the hg-fast-export tool on Windows (from finicky python version needed to cleaning up mercurial repository to satisfy the tool) I have stumbled upon a n error that I cannot solve:

master: Exporting full revision 1/98 with 142/0/0 added/changed/removed files
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_5956
Traceback (most recent call last):
  File "../fast-export/hg-fast-export.py", line 388, in <module>
    options.statusfile,authors=a,sob=options.sob,force=options.force))
  File "../fast-export/hg-fast-export.py", line 322, in hg2git
    c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap)
  File "../fast-export/hg-fast-export.py", line 214, in export_commit
    export_file_contents(ctx,man,added)
  File "../fast-export/hg-fast-export.py", line 126, in export_file_contents
    wr(d)
  File "../fast-export/hg-fast-export.py", line 28, in wr
    print msg
  File "c:\Python26\lib\site-packages\mercurial\windows.py", line 70, in write
    raise IOError(errno.EPIPE, 'Broken pipe')
IOError: [Errno 32] Broken pipe

The error seems to be: Branch name doesn’t conform to GIT standards: refs/heads/master

Does anyone have a clue on how to solve this issue?

My mercurial repository is clean and working properly, with only one head, all nice and hot ready to be exported.

EDIT:

I solved the problem by using TortoiseHG combined with hg-git. For anyone looking for a way to export a mercurial rep. to git or vice-versa, just follow the steps described here: http://www.ffuts.org/blog/accessing-a-git-repository-with-tortoisehg-on-windows/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:20:09+00:00Added an answer on June 1, 2026 at 8:20 am

    I just solved this problem for myself.

    It turns out that Python was forcing there to be a '\r\n' at the end of every line that was output by hg-fast-export. This meant that the branch names were being interpreted like 'refs/heads/master\r', which is invalid.

    The answer to this questsion…

    Make Python stop emitting a carriage return when writing newlines to sys.stdout

    …can be placed at the top of the hg-fast-export file, in order to switch to a binary mode.

    EDIT:
    The code to add is:

    if sys.platform == "win32":
       import os, msvcrt
       msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
    

    Just place it at the top of hg-fast-export.py and make sure you have an import sys at the top.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After solving all authentication related problems in my first Spring web application I'm now
This question comes after solving my last question , I'd like to get some
I'm playing with Haskell and Project Euler's 23rd problem. After solving it with lists
so i was doing some algorithm solving problems and the first questions input/output test
After solving the other problem with routes , now I have another one. I
Edit: Below is my original question. After solving my problem, I thought I'd re-edit
I recently started solving Project Euler problems in Scala, however when I got to
I'm looking for an efficient way of solving a particular problem in Python. I
Well, after solving this problem by naive STL set,I was reading the forum entries,there
After the FBML problems I switched to iFrame apps. All well for now except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.