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

[BUG] git-svn fails to rename files with %20 in filename

From
Will Palmer <wmpalmer@gmail.com>
Date
Feb 21, 2011, 10:12 UTC
Message-ID
<1298283144.2772.7.camel@wpalmer.simply-domain>

Someone accidentally checked some files containing "%20" in their names into our svn repository, which is accessed with either svn or git-svn depending on the developer. When I attempted to correct this by renaming the file, I received (on dcommit): Filesystem has no item: File not found: revision 1, path '/theBeginningOfTheOriginalFileName theRestOfTheOriginalFilename' at /home/wpalmer/libexec/git-core/git-svn line 576

A recipe for reproducing this bug is as follows:
#!/bin/bash
temp="$(mktemp -t -d 'git-svn.XXXXXXXXXX')"
[ -n "$temp" ] || { echo "Failed to create temporary directory" >&2;
exit 1; }
function _cleanup(){
	rm -rf "$temp"
}
trap _cleanup INT EXIT
cd "$temp" || exit 1

set -x svnadmin create svn-repos && svn co file://$PWD/svn-repos svn-wc && cd svn-wc && touch 'foo%20bar' && svn add 'foo%20bar' && svn ci -m 'add foo%20bar' && cd .. && git svn clone file://$PWD/svn-repos git-wc && cd git-wc && git mv 'foo%20bar' 'foo-bar' && git commit -m 's/%20/-/ in filename' && git svn dcommit # BUG HERE

Next: Jeff King
Message 1 of 6 in “[BUG] git-svn fails to rename files with %20 in filename”
  1. Will PalmerFeb 21, 2011
  2. Jeff KingFeb 21, 2011
  3. Will PalmerFeb 22, 2011
  4. Jeff KingFeb 23, 2011
  5. Steven ScottMar 2, 2011
  6. Steven ScottFeb 21, 2011

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.