22

The minimal reproducible failure is as follows:

> mkdir test && cd test
> svn co https://svn.server.com/repo .
> vim php/main.php
> svn commit
Sending        php/main.php
Transmitting file data ..svn: Commit failed (details follow):
svn: File not found: Transaction »52-1r«, Path »/php/main.php«
svn: Your commit message was left in a temporary file:

What puzzles me is that this is a clean checkout, nobody has touched the repo (an svn update before the commit makes no difference) and the file does exist (I can ls it or vim it).

The only notable thing here is that the folder name which contains main.php has changed between r1 and r52.

Where does that issue come from, why can that file not be found when it's obviously there? And how can I fix this?

6
  • 2
    try svn cleanup and then do a commit. If that doesn't help, you'll have to get onto the server and do svnadmin lslocks and svnadmin lstxns. You might have to use svnadmin rmlocks and svnadmin rmtxns to clean up.
    – David W.
    Sep 13, 2013 at 1:30
  • 1
    @DavidW. The svn cleanup didn't fix the commit. And both svnadmin lslocks and svnadmin lstxns return nothing.
    – Jens
    Sep 14, 2013 at 0:30
  • Okay, take a look at the repository, and make sure the permissions of all the files and directories are owned by the user who is running the server (or Apache if you're using Apache), and are writable by that user. I sometimes find that bad permissions will allow a checkout, but not a commit.
    – David W.
    Sep 16, 2013 at 1:33
  • @DavidW. Wow, I found the issue... see the answer below :) Thanks for the tips though!
    – Jens
    Sep 16, 2013 at 19:10
  • I had a very similar problem. We had started the svn server using the wrong path.
    – Josiah
    May 17, 2016 at 14:03

4 Answers 4

42

You will also get this message when creating a tag using the client by copying into a new path where more than one level of the desired folder structure does not exist in repository. (Jeez that sounds complicated.)

In other words, I attempted to create a tag:

/projects/MyAwesomeProject/tags/myFirstTag

...but the 'tags' folder did not exist yet. I expected the client to do the work for me; manually creating the 'tags' folder was the cure.

4
  • 2
    It sounds like a better error message would have been beneficial :)
    – Jens
    Mar 18, 2014 at 0:29
  • 2
    Thanks, have just encountered exactly this issue. Amusingly (or otherwise) it also fails if the directory already exists because you've just created the full path for it - I suppose I can probably see the logic for this one though.
    – SiHa
    Sep 22, 2014 at 8:16
  • 2
    svn mkdir to manually make the directory, or re-run with the --parents argument like so: svn copy --parents source destination -m "Message". Jul 20, 2018 at 20:34
  • Similar to my experience. it seems you cannot create a tag two levels down. I had this problem, doing so. Example: Tag->ChildFolder->SnapshotFolder Removing ChildFolder fixed my issue. It will however create the SnapshotFolder for me if it doesn't already exist and complain if it does.
    – eaglei22
    Mar 4, 2020 at 0:00
8

This is resolved for me after selecting check box present at bottom of SVN client. "Create intermediate folders"

7

Short Answer

My client version of subversion was outdated.

Long Answer

I'm running MacPorts on my Mac and somehow assumed that I had Subversion installed as a part of that. Alas, I had not, and my svn command was Apple's default svn, version 1.6.17 (r1128011) which runs with subversion format 10.

The repository runs svn, version 1.7.13 (r1516569) which runs with subversion format 12.

After updating (i.e. installing) my local svn, version 1.8.3 (r1516576) which runs with format 12 as well and svn upgrade my local repository tree to the current version, I could commit all my changes without problems.

3

svn cleanup did the trick for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.