我正在尝试将我的WordPress插件发布到分配给我的svn存储库。我使用的是git
而不是svn,因此我正在尝试使用git-svn,但是当我使用这些说明来推送本地git存储库时,我遇到了以下错误:
$ 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.
我已经进行了大量搜索(请参见下面的“其他资源”),我了解这个问题通常是由于在使用git svn
时与子模块一起使用导致的。我曾经有一个子模块,但是我使用git filter-branch
(在此处描述)提交了文件并删除了.gitmodules
,但问题仍然存在。所以我继续搜索,似乎使用composer和/或bower也会导致同样的问题。
我还没有尝试将vendor/
从我的.gitignore文件中移除并提交所有第三方库...我有一个预感这可能有效,但即使它有效,这也不是可持续的长期解决方案。
有没有办法告诉git-svn忽略我的.gitignore文件并上传所有的vendor/文件
?还是有其他方法避免将所有依赖项都提交到仓库中?还是这是我想象中的不同问题?提前致谢!
更新1
我从我的.gitignore
文件中删除了vendor/**
并在本地存储库中提交了依赖项(但没有推送到源)。但我得到了完全相同的错误!
更新2 我将所有文件复制到一个新目录中,并尝试进行基本的svn提交。没有子模块。包括所有vendor/文件。但是我得到了另一个错误:
$ 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
我尝试使用
svn cleanup
命令,但出现了相同的情况。
更新3
我试着从头开始,但是仍然出现了相同的错误。以下是确切的命令序列:$ 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
这让我觉得服务器上出了问题。
其他资源
- git-svn - #object# doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4706
- http://www.ignoredbydinosaurs.com/2011/06/quick-trip-panic-room
- http://threebrothers.org/brendan/blog/rails2-upgrade-git-svn-workflow-warts/
- http://blog.winding-lines.com/2009/02/git-svn-and-submodules.html
- 将现有的git仓库推送到SVN
- http://flavio.castelli.name/2007/09/04/howto_use_git_with_svn/
dcommit
之前,您可以尝试这个解决使用 svn 时 git 子模块的问题。 - TheCodeArtist