-
Notifications
You must be signed in to change notification settings - Fork 255
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
Branch mapping not working with quotation mark #292
Comments
Fast-export feeds git-fast-import through a pipe. When fast-import dies because of an error and closes its end of the pipe, fast-export crashes when it cannot write to the pipe. As fast export runs asynchronously from fast-import, the actual error that trips up fast-import is not necessarily related to what fast-export outputs to stderr right before the backtrace triggered by the broken pipe. Git fast-import will have produced a crash log (check the CRASH REPORTS section in git-fast-import's man page) before it died, and that should give you a clue to what's wrong. My guess is that you have a dodgy author or branch name, but probably not the one you think. You didn't provide the full output from fast export, so also check the "Frequent Problems" section in the README, particularly the issue "My mapping file does not seem to work when I rename the branch git fast-import crashes on!" to eliminate that error source. |
I am using the unmangled branch name in the map file. This is what's in the crash log: fast-import crash report: fatal: Branch name doesn't conform to GIT standards: refs/heads/Feature- 12V Vac "Venom" |
It looks like the hack in Unfortunately I have very little time to spend on fast-export, so patches welcome. |
The problem still seems to occur back on Python 2.7 and 3.6, so I'm not sure when it stopped working, or if it never worked as intended (I suspect the latter). In any case, PR here: #293 |
@ruku320, please reopen if @chrisjbillington's patch doesn't resolve the problem. I'll hold off creating a new release for a couple of days until you can confirm that it works for you too (it works in my tests). |
I can confirm that the patch fixes the problem. Thanks! |
I have a branch with the name Feature- 12V Vac "Venom". I have a branch map file to rename this branch with the following mapping:
"Feature- 12V Vac \"Venom\""="Feature-_12V_Vac_Venom"
Branch mapping doesn't seem to recognize the escaped quotes correctly to rename the branch since I get the following error when I run the script to convert the repo:
Feature- 12V Vac "Venom": Exporting simple delta revision 3530/4034 with 0/5/0 added/changed/removed files
Traceback (most recent call last):
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 728, in
sys.exit(hg2git(options.repourl,m,options.marksfile,options.mappingfile,
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 581, in hg2git
c=export_commit(ui,repo,rev,old_marks,max,c,authors,branchesmap,
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 372, in export_commit
export_file_contents(ctx,man,changed,hgtags,fn_encoding,plugins)
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 238, in export_file_contents
wr(d)
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 54, in wr
wr_no_nl(msg)
File "C:\git_convert\hg-export-tool-master\fast-export\hg-fast-export.py", line 51, in wr_no_nl
stdout_buffer.write(msg)
BrokenPipeError: [Errno 32] Broken pipe
error!!!!
The text was updated successfully, but these errors were encountered: