Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail on old repository #32

Closed
stoune opened this issue Jul 4, 2014 · 5 comments
Closed

Fail on old repository #32

stoune opened this issue Jul 4, 2014 · 5 comments

Comments

@stoune
Copy link

stoune commented Jul 4, 2014

I have quite large repository. When I'm exporting to git from hg I'm receiving error:

master: Exporting thorough delta revision 2804/4207 with 0/23/1 added/changed/removed files
Traceback (most recent call last):
  File "../fast-export/hg-fast-export.py", line 432, in <module>
    options.statusfile,authors=a,sob=options.sob,force=options.force,hgtags=options.hgtags,notes=options.notes))
  File "../fast-export/hg-fast-export.py", line 362, in hg2git
    c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap,hgtags,notes)
  File "../fast-export/hg-fast-export.py", line 224, in export_commit
    export_file_contents(ctx,man,changed,hgtags)
  File "../fast-export/hg-fast-export.py", line 136, in export_file_contents
    wr(d)
  File "../fast-export/hg-fast-export.py", line 37, in wr
    wr_no_nl(msg)
  File "../fast-export/hg-fast-export.py", line 34, in wr_no_nl
    sys.stdout.write(msg)
IOError: [Errno 32] Broken pipe

I'm used following options:
../fast-export/hg-fast-export.sh -r reponame/ --hgtags --hg-hash --force

@frej
Copy link
Owner

frej commented Jul 4, 2014

Duplicate of #34

@frej frej closed this as completed Jul 4, 2014
@lwcolton
Copy link

@frej This is not a duplicate of #34 . If you look at the call stack here, sanitize_name is not being called at all. I am experiencing this issue as well and will provide a pull request if I can.

@danielpunkass
Copy link

I just ran into this with one of my projects. Same stack trace with export_file_contents, etc. No sanitize_name in the stack.

@danielpunkass
Copy link

In my case the crash was occuring in fast import because one of my branch names was problematic, even after being sanitized by sanitize_name. The imported repository had a branch named erroneously after a whole ssh:// URL, so something like:

ssh://daniel@where-ever.com/repos/something

The branch name was sanitized to replace the colon, but apparently the "/" also causes problems. I'll submit a pull request with a tweak to add / to the regex for sanitizing. This worked around the issue for me.

@danielpunkass
Copy link

Anybody else who comes across this issue, the right solution is to use the branch renaming -B flag to alleviate any problems that may be occurring because of the old Mercurial branch names. See explanation on #285.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants