6

I'm attempting to create a branch in one of my subversion repositories and keep running into an error. No mater what is done, I keep getting the following:

File not found: transaction '3062-2e6', path '/Software/XXXXXX/branches/testbranch'

I've noticed that the first part of the '3063-3e6' in the above message is the last successful committed revision in the repository. My apache logs don't give much more information:

[Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] Could not MOVE/COPY /svn/p070361/!svn/bc/3049/Software/SXXXXXX/trunk.  [404, #0]
[Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] Unable to make a filesystem copy.  [404, #160013]
[Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] File not found: transaction '3059-2e2', path '/Software/XXXXXX/branches/testbranch'  [404, #160013]

This is all happening on a server with an nginx frontend that proxies to Apache for the subversion bits. Other repositories are able to branch fine and I was able to create the branch using file:/// from the command line on the server this is occurring on. The permissions on this repository match every other repository and disk space is not an issue.

3
  • It sounds an awful lot like your repo is corrupted. Nov 25, 2010 at 0:44
  • I thought that at first as well, but an svn copy from the command line using file:/// worked just fine. Nov 26, 2010 at 15:44
  • I've narrowed it down to spaces in the directory path. Sometimes the XXXXX in the path above contains spaces. In those cases, I see the error above. If the path does not contain spaces, no error occurs. This will most likely require some reconfiguration of the Nginx front-end, which will be tried after hours. Nov 29, 2010 at 15:04

4 Answers 4

9

Probably your svn structure has no "Software/XXXXXX/branches" directory, it must exists in order to create "testbranch" here. You should make this directory ("branches") by hands and then do a branch.

9

This unhelpful error message can occur if subdirectories on the destination path do not yet exist. Whilst you can manually create them (with svn mkdir) it is easier to use the --parents option.

    svn cp ^/trunk/bigproject ^/branches/experimental/bigproject -m 'test branch'

If branches or experimental did not exist then command would fail. This should work:

    svn cp --parents ^/trunk/bigproject ^/branches/experimental/bigproject -m 'test branch'
1
  • if you carelessly use -parents(just one -), there maybe this error: svn: E200007: Cannot mix repository and working copy sources
    – zhuguowei
    Jul 4, 2016 at 4:23
1

We had exactly the same issue and it is a pity that here are only useless answers.

This is not an svn problem, it is a nginx issue. As the OP mentioned in a comment, this has to do with whitespace (or other chars that needs url encoding) in the path. There happens an overencoding, so that the path is wrong, when it reaches svn.

Old open bug at nginx

But there is a workaround in the nginx rewrite rule, that avoids this additional wrong encoding:

Wrong encoding happens:

if ( $http_destination ~* ^(.*)$ )
{
    set $fixed_destination $1;
}

no additional encoding:

if ( $http_destination ~* ^(?<fix>.*)$ )
{
    set $fixed_destination $fix;
}    

The solution here is to use a named group, that is the difference that makes nginx behave differently in this case, but we did not found any documentation explaining this.

-1

I know that this is not the direct answer to your problems, but if you want to work with branches effectivly you should consider using other version control systems like git, mercurial or bazzar.

Or if you don't want to make the full migration, you can use git-svn was a "front-end" of your svn repository, i recommend you to read this to know more about git-svn.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .