Comments (6)
I can confirm that the patch fixes the problem. Thanks!
from fast-export.
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.
from fast-export.
I am using the unmangled branch name in the map file.
This is what's in the crash log:
fast-import crash report:
fast-import process: 27940
parent process : 1
at 2022-10-21 16:56:46 +0000
fatal: Branch name doesn't conform to GIT standards: refs/heads/Feature- 12V Vac "Venom"
from fast-export.
It looks like the hack in process_unicode_escape_sequences
in hg-fast-export.py
has stopped working and what ends in the internal mapping is b'Feature- 12V Vac \\"Venom\\"'
and not the b'Feature- 12V Vac "Venom"'
we want. @chrisjbillington you came up with this trick, are we so lucky you already have a solution that works on a modern Python?
Unfortunately I have very little time to spend on fast-export, so patches welcome.
from fast-export.
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, .encode('unicode-escape')
is not doing what we want, it is adding extra escapes for backslashes, such that they round-trip .decode('unicode-escape').encode('unicode-escape')
. But we want them to pass through the .encode()
unchanged and be interpreted as the character they represent upon .decode()
.
PR here: #293
from fast-export.
@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).
from fast-export.
Related Issues (20)
- export project with submodules does not contain a valid uri HOT 1
- .hgsub is still available after conversion HOT 1
- .hgignore is not replaced by .gitignore HOT 1
- Reduce repository size HOT 1
- Not all modules are defined in mapping file. HOT 2
- Commit messages are decoded as cp1252 with parameter -e utf8 HOT 1
- Yet another "cannot lock ref", mapping seems not to help HOT 2
- no difference between empty and no plugin option HOT 4
- fast-export only converts default branch HOT 3
- Support for Python 3.12 (e.g. replace `imp` usage for Python 3 users)
- hg-fast-export.py fails due to missing hg2git module HOT 3
- Cannot execute fast export due to missing module importlib.machinery HOT 6
- Renaming files ignores file deletions HOT 1
- Importing mercurial repository fails with syntax error HOT 1
- Error -5 while decompressing data HOT 2
- Archives doesn't contain sharness folder HOT 2
- Running content filter fails, maybe because of an empty commit HOT 2
- git checkout HEAD ERROR HOT 4
- Add tag filtering in plugins HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-export.