git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] remote-hg: unquote C-style paths when exporting

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 23, 2013, 00:45 UTC
Message-ID
<CAMP44s37-R0u4oLnuRfdghx-Tk3X9eer0MVTcAGmPZ3Bu32dug@mail.gmail.com>
In-Reply-To
<CALWbr2zsOYNN45d+qHDQ88eLj82iV4QxJ_9ro+RGk7upBJVATA@mail.gmail.com>
On Tue, Oct 22, 2013 at 3:49 PM, Antoine Pelisse <apelisse@gmail.com> wrote:
> It is true that I have expected "valid output" from git-fast-export.
> And I don't have in mind any easy solution to detect that the output
> is broken, yet still accepted as a valid string by python. We could
> obviously write a unquote_c_style() equivalent in python if needed.
Something like this?
def c_style_unescape(string):
    if string[0] == string[-1] == '"':
        return string.decode('string-escape')[1:-1]
    return string
It's in git-remote-bzr.py.
-- 
Felipe Contreras
Previous: Antoine PelisseNext: Antoine Pelisse
Message 4 of 7 in “remote-hg: unquote C-style paths when exporting”
  1. remote-hg: unquote C-style paths when exportingAntoine Pelisse, Oct 18, 2013
  2. Junio C HamanoOct 22, 2013
  3. Antoine PelisseOct 22, 2013
  4. Felipe ContrerasOct 23, 2013
  5. Antoine PelisseOct 23, 2013
  6. Re* [PATCH] remote-hg: unquote C-style paths when exportingJunio C Hamano, Oct 23, 2013
  7. Antoine PelisseOct 23, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.