{"thread":{"id":"29874","subject":"Bug in svn-fe: copying the root directory acts as if it's an empty directory","startedAt":"2012-03-07T23:13:06Z","lastAt":"2012-03-08T00:46:14Z","messageCount":2,"participants":["Andrew Sayers","David Barr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"186354","messageId":"4F57EB82.4000309@pileofstuff.org","threadId":"29874","inReplyTo":null,"subject":"Bug in svn-fe: copying the root directory acts as if it's an empty directory","fromName":"Andrew Sayers","fromEmail":"andrew-git@pileofstuff.org","sentAt":"2012-03-07T23:13:06Z","receivedAt":"2012-03-07T23:13:06Z","isPatch":false,"sender":{"key":"andrew-git@pileofstuff.org","avatar":null},"body":"Here's a bug with svn-fe that I stumbled over while snorkelling through\nrepo madness.  I've tested it with the version of svn-fe in git.git's\nmaster branch.\n\nCopying the root directory to a sub-directory (e.g. doing `svn cp .\ntrunk` to standardise your layout) doesn't correctly initialise the new\ndirectory.  To replicate the issue, run the following script from an\nempty directory (update GIT_DIR to point to your git.git repository):\n\nGIT_DIR=\"/home/andrew/git/git\"\nROOT_DIR=\"$(pwd)\"\n\nsvnadmin create repo\nsvn checkout \"file://$ROOT_DIR/repo\" checkout\ncd checkout\necho text > README.txt\nsvn add README.txt\nsvn ci -m \"Created README.txt\"\nsvn cp \"file://$ROOT_DIR/repo\" \"file://$ROOT_DIR/repo/trunk\" \\\n    -m \"Created trunk\"\ncd ..\nmkfifo backchannel\nmkdir git-repo\ncd git-repo/\ngit init\nsvnadmin dump --deltas \"$ROOT_DIR/repo\" \\\n    | \"$GIT_DIR/contrib/svn-fe/svn-fe\" 3<../backchannel \\\n    | \"$GIT_DIR/git-fast-import\" --cat-blob-fd=3 3>../backchannel\n\nExpected: the git repo contains \"README.txt\" and \"trunk/README.txt\"\nObserved: \"README.txt\" exists but \"trunk/README.txt\" doesn't\n\n\t- Andrew\n"},{"id":"186364","messageId":"CAFfmPPOB5xq2zHeEL-cPw9HU7Kzm3NVNAoO+znr+Lk=vRyOvOw@mail.gmail.com","threadId":"29874","inReplyTo":"4F57EB82.4000309@pileofstuff.org","subject":"Re: Bug in svn-fe: copying the root directory acts as if it's an empty directory","fromName":"David Barr","fromEmail":"davidbarr@google.com","sentAt":"2012-03-08T00:46:14Z","receivedAt":"2012-03-08T00:46:14Z","isPatch":false,"sender":{"key":"davidbarr@google.com","avatar":"https://avatars.githubusercontent.com/u/220594?v=4"},"body":"Hi Andrew,\n\nOn Thu, Mar 8, 2012 at 10:13 AM, Andrew Sayers\n<andrew-git@pileofstuff.org> wrote:\n> Here's a bug with svn-fe that I stumbled over while snorkelling through\n> repo madness.  I've tested it with the version of svn-fe in git.git's\n> master branch.\n>\n> Copying the root directory to a sub-directory (e.g. doing `svn cp .\n> trunk` to standardise your layout) doesn't correctly initialise the new\n> directory.\n\nThis issue sounds very familiar, I wonder if there's an existing test\nor pending patch for it? Maybe Dmitry or Jonathan can recall.\n\n> To replicate the issue, run the following script from an\n> empty directory (update GIT_DIR to point to your git.git repository):\n>\n> GIT_DIR=\"/home/andrew/git/git\"\n> ROOT_DIR=\"$(pwd)\"\n>\n> svnadmin create repo\n> svn checkout \"file://$ROOT_DIR/repo\" checkout\n> cd checkout\n> echo text > README.txt\n> svn add README.txt\n> svn ci -m \"Created README.txt\"\n> svn cp \"file://$ROOT_DIR/repo\" \"file://$ROOT_DIR/repo/trunk\" \\\n>    -m \"Created trunk\"\n> cd ..\n> mkfifo backchannel\n> mkdir git-repo\n> cd git-repo/\n> git init\n> svnadmin dump --deltas \"$ROOT_DIR/repo\" \\\n>    | \"$GIT_DIR/contrib/svn-fe/svn-fe\" 3<../backchannel \\\n>    | \"$GIT_DIR/git-fast-import\" --cat-blob-fd=3 3>../backchannel\n>\n> Expected: the git repo contains \"README.txt\" and \"trunk/README.txt\"\n> Observed: \"README.txt\" exists but \"trunk/README.txt\" doesn't\n\nThanks for including a reproduction.\n\n--\nDavid Barr\n"}]}