我一直试图将目录结构从一个位置移动到Subversion中的另一个位置,但我得到一个项目“*”是过期提交错误。

我已经检查了最新的版本(据我所知)。SVN st -u除了mv命令外没有其他区别。


当前回答

谢谢你!这就解决了我的问题。 SVN update——force /path to filename/

如果您最近在本地目录中的文件是相同的,则没有提示。如果文件是不同的,它会提示tf, mf等…选择mf(我的满)确保没有什么被覆盖,我可以提交时完成。

松鸦 CompuMatter

其他回答

当我用主干中的文件更新早期版本的一个分支时,就发生了这种情况。我使用Windows资源管理器从主干签出文件夹中复制文件夹,并将它们粘贴到发布分支签出文件夹的Eclipse视图中。现在Windows资源管理器被配置为不显示以“。”开头的“隐藏”文件,所以我没有注意到所有错误的.svn文件被粘贴到我的发布分支签出文件夹中。哎!

我的解决方案是删除损坏的Eclipse项目,再次检出它,然后更仔细地复制新文件。我还更改了Windows以显示“隐藏”文件。

我有时会在windows上使用TortoiseSVN。对我来说,解决方案是svn更新目录,即使没有需要下载或更新的修订。它对元数据做了一些事情,神奇地修复了它。

谢谢你!这就解决了我的问题。 SVN update——force /path to filename/

如果您最近在本地目录中的文件是相同的,则没有提示。如果文件是不同的,它会提示tf, mf等…选择mf(我的满)确保没有什么被覆盖,我可以提交时完成。

松鸦 CompuMatter

至少有一个其他原因导致消息“过期”错误。在我的例子中,问题是.svn/dir-props,这是通过运行“svn propset svn:ignore -F .gitignore .”第一次创建的。删除.svn/dir-props似乎是一个坏主意,可能会导致其他错误,所以最好使用"svn propdel"来清理错误的"svn propset"。

# Normal state, works fine.
> svn commit -m"bump"  
Sending        eac_cpf.xsl
Transmitting file data .
Committed revision 509.

# Set a property, but forget to commit.
> svn propset svn:ignore -F .gitignore .
property 'svn:ignore' set on '.'

# Edit a file. Should have committed before the edit.
> svn commit -m"bump"                   
Sending        .
svn: Commit failed (details follow):
svn: File or directory '.' is out of date; try updating
svn: resource out of date; try updating

# Delete the property.
> svn propdel svn:ignore .              
property 'svn:ignore' deleted from '.'.

# Now the commit works fine.
> svn commit -m"bump"     
Sending        eac_cpf.xsl
Transmitting file data .
Committed revision 510.

当我试图提交一些文件时,我得到了这个错误,只有它是一个文件/文件夹,在我的工作副本中不存在。我真的不想经历移动文件和重新签出的麻烦,最后,我最终编辑了.svn/entries文件并删除了冒犯的目录引用。