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

Bug-Report: git-svn and backslash in SVN branch name

From
MFMichael Fladischer <michael@fladi.at>
Date
Dec 22, 2016, 10:12 UTC
Message-ID
<cb8cd9b1-9882-64d2-435d-40d0b2b82d59@fladi.at>
Hi,

I'm trying to clone a SVN repo in order to migrate it to git but i hit a wall with SVN branch names that contain a backslash, which seems to be allowed in SVN but prohibited in git refs:

r289 = c4cb1f0c34e741a07de9673515c853d49c5522b9
(refs/remotes/origin/dicomBaseClass)
Found possible branch point: file:///path.repo/trunk/dicomBaseClass =>
file:///path.repo/tags/dicomBaseClass%5Cv0.1, 181
Initializing parent: refs/remotes/origin/tags/dicomBaseClass\v0.1@181
W: Ignoring error from SVN, path probably does not exist: (160013):
Filesystem has no item: File not found: revision 101, path
'/trunk/dicomBaseClass'
W: Do not be alarmed at the above message git-svn is just searching
aggressively for old history.
This may take a while on large repositories
Found possible branch point: file:///path.repo/dicomBaseClass =>
file:///path.repo/trunk/dicomBaseClass, 172
Initializing parent: refs/remotes/origin/tags/dicomBaseClass\v0.1@172
fatal: update_ref failed for ref
'refs/remotes/origin/tags/dicomBaseClass\v0.1@172': refusing to update
ref with bad name
'refs/remotes/origin/tags/dicomBaseClass\v0.1@172'
update-ref -m r75 refs/remotes/origin/tags/dicomBaseClass\v0.1@172
1fe0cc23e3cd56a1087562f8ca3d2e40cd2b30d4: command returned error: 128
The tag in case is "dicomBaseClass\v0.1@172".

Is there a way to mangle those names on the fly to get rid of the backslashes or can they be handled in any other way to be compatible with git?

Cheers,
-- 
Michael Fladischer
Fladi.at
Next: Eric Wong
Message 1 of 5 in “Bug-Report: git-svn and backslash in SVN branch name”
  1. Michael FladischerDec 22, 2016
  2. git-svn: escape backslashes in refnamesEric Wong, Dec 23, 2016
  3. Michael FladischerDec 23, 2016
  4. Eric WongFeb 21, 2017
  5. Junio C HamanoFeb 21, 2017

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.