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

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


当前回答

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

其他回答

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

至少有一个其他原因导致消息“过期”错误。在我的例子中,问题是.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.

就像@Alexander-Klyubin建议的那样,在存储库中进行移动。它也会快得多,特别是如果你有大量的数据要移动,因为你不需要再次通过网络传输所有的数据。

svn mv https://username@server/svn/old/ https://username@server/svn/new/

应该可以正常工作

将服务器和客户端升级到Subversion 1.9。

如果过期错误在正常情况下不会发生的情况下随机发生,则在运行提交时,可能表明您正在使用过时且不受支持的Subversion 1.7或更老的客户端或服务器。

为了解决这个问题,您应该升级服务器和客户端。请参阅相关的Subversion 1.9发行说明条目:通过HTTPv1提交时出现“过期”错误。

只需在命令行中执行svn up,或者如果您在windows中选择svn更新选项。

一旦完成,你就可以做出进一步的行动,比如提交和其他。