12

I'm trying to publish my Wordpresss plugin to the svn repository they assigned me. I use git (not svn) so I'm trying to use git-svn to but I'm getting the following error when I try to push my local git repo using these instructions:

$ git svn dcommit
Committing to http://plugins.svn.wordpress.org/wp-github-pipeline/trunk ...
    A   .bowerrc
    A   composer.json
    A   composer.lock
   ...
    A   vendor/guzzle/guzzle
b3f5050cb6270c7a728a0b74ac2de50a262b3e02 doesn't exist in the repository at /usr/local/git/lib/perl5/site_perl/Git/SVN/Editor.pm line 401.
Failed to read object b3f5050cb6270c7a728a0b74ac2de50a262b3e02 at /usr/local/git/libexec/git-core/git-svn line 1011.

I've done a lot of searching (see "Other Resources" below) and I understand this problem commonly results from the use of submodules in conjunction with git svn. I did have a submodule at one point, but I committed the files and removed .gitmodules using git filter-branch described here but the problem persisted. So I searched more and it seems that using composer and/or bower can cause the same problem.

I haven't tried removing vendor/ from my .gitignore and committing all the 3rd party libraries... I have a hunch that might work, but even if it does it's not a sustainable long-term solution.

Is there a way to tell git-svn to ignore my .gitignore and upload all the vendor/ files?. Or is there another way to avoid committing ALL my dependancies into the repo? Or is this a different problem than what I think? Thanks in advance!

UPDATE 1 I removed vendor/** from my .gitignore and committed the dependencies in my local repository (but didn't push to origin). But I got the exact same error!

UPDATE 2 I copied all the files into a new directory and tried to do a basic svn commit. No submodules. All vendor/ files included. And I get another error:

$ svn ci -m 'Adding version 1.0 files'
Sending        trunk/.gitignore
Adding         trunk/README.md
...
Adding         trunk/vendor/wp-cli/wp-cli/utils/wp-completion.bash
Adding         trunk/wp-cli.yml
Adding         trunk/wp-github-pipeline.php
Transmitting file data .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................svn: E000002: Commit failed (details follow):
svn: E000002: Can't open file '/home/svn/repos/wp-plugins/db/transactions/1232700-rw56.txn/props': No such file or directory

I tried svn cleanup and the same thing happened.

UPDATE 3 I tried starting over from scratch and the SAME error happens. Here is the exact sequence of commands:

$ mkdir pipeline_svn2
$ svn co http://plugins.svn.wordpress.org/wp-github-pipeline pipeline_svn2
$ cd pipeline_svn2

[ copied all files into pipeline_svn2/ ]

$ svn add trunk/*
$ svn ci -m 'Adding v1.0 files'

[ lots of these... ]
Adding         trunk/wp-github-pipeline.php
Transmitting file data ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................svn: E000002: Commit failed (details follow):
svn: E000002: Can't open file '/home/svn/repos/wp-plugins/db/transactions/1233755-rx30.txn/props': No such file or directory

It's making me think something is screwed up on the server.

Other Resources

Community
  • 1
  • 1
emersonthis
  • 32,822
  • 59
  • 210
  • 375
  • Starting from scratch, before attempting `dcommit` can you try [**this**](http://blog.easy-designs.net/archives/subtree-merge-as-an-alternative-to-submodules-with-git-svn/) to "fix" the git sub-modules problem with svn? – TheCodeArtist Aug 30 '15 at 07:38

2 Answers2

6

I finally got to the bottom of this...

After speaking with the Wordpress plugin team, they recommended that I try using the https: protocol (instead of http:):

Instead of using http://plugins.svn.wordpress.org/wp-github-pipeline as your plugin SVN URL, try using https://plugins.svn.wordpress.org/wp-github-pipeline instead.

Sometimes, proxies and various routers and other types of traffic modifiers interfere with SVN traffic, for some people. Using https allows for end-to-end encryption, preventing most of these from altering the traffic and causing these sorts of problems.

I made the change with svn relocate and it still didn't work, but it gave a more verbose error message. So I did some more research and found this post which suggests that my new error might be related to permissions/authentication.

So on a hunch, I re-authenticated after removing the file in ~/.subversion/auth/svn.simple and did a brand new svn co and started from scratch, using https: and then it finally worked!

I'm not sure if the problem was related to http-->https redirection or a problem with authentication (I have two Wordpress.org accounts).

Community
  • 1
  • 1
emersonthis
  • 32,822
  • 59
  • 210
  • 375
0

I had the same problem today. In one commit, I accidently replaced a symlink by a submodule. There were two problems:

  1. changing the type of something is not possible in one commit in svn, for example file -> directory, directory -> file, file -> symlink etc.
  2. obviously, git submodules is a feature of git and cannot be handlet by git svn

I didn't invest more time in finding out which of these two problems really stopped git svn

Daniel Alder
  • 5,031
  • 2
  • 45
  • 55