Coder Social home page Coder Social logo

Comments (6)

ruku320 avatar ruku320 commented on July 22, 2024 1

I can confirm that the patch fixes the problem. Thanks!

from fast-export.

frej avatar frej commented on July 22, 2024

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.

ruku320 avatar ruku320 commented on July 22, 2024

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.

frej avatar frej commented on July 22, 2024

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.

chrisjbillington avatar chrisjbillington commented on July 22, 2024

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.

frej avatar frej commented on July 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.