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

Bug in svn-fe: copying the root directory acts as if it's an empty directory

From
ASAndrew Sayers <andrew-git@pileofstuff.org>
Date
Mar 7, 2012, 23:13 UTC
Message-ID
<4F57EB82.4000309@pileofstuff.org>

Here's a bug with svn-fe that I stumbled over while snorkelling through repo madness. I've tested it with the version of svn-fe in git.git's master branch.

Copying the root directory to a sub-directory (e.g. doing `svn cp . trunk` to standardise your layout) doesn't correctly initialise the new directory. To replicate the issue, run the following script from an empty directory (update GIT_DIR to point to your git.git repository):

GIT_DIR="/home/andrew/git/git" ROOT_DIR="$(pwd)"

svnadmin create repo
svn checkout "file://$ROOT_DIR/repo" checkout
cd checkout
echo text > README.txt
svn add README.txt
svn ci -m "Created README.txt"
svn cp "file://$ROOT_DIR/repo" "file://$ROOT_DIR/repo/trunk" \
    -m "Created trunk"
cd ..
mkfifo backchannel
mkdir git-repo
cd git-repo/
git init
svnadmin dump --deltas "$ROOT_DIR/repo" \
    | "$GIT_DIR/contrib/svn-fe/svn-fe" 3<../backchannel \
    | "$GIT_DIR/git-fast-import" --cat-blob-fd=3 3>../backchannel
Expected: the git repo contains "README.txt" and "trunk/README.txt"
Observed: "README.txt" exists but "trunk/README.txt" doesn't
	- Andrew
Next: David Barr
Message 1 of 2 in “Bug in svn-fe: copying the root directory acts as if it's an empty directory”
  1. Andrew SayersMar 7, 2012
  2. David BarrMar 8, 2012

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.