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

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


当前回答

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

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

其他回答

你是用svn mv来移动它,还是只用mv?我认为只使用mv可能会导致这个问题。

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

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

松鸦 CompuMatter

删除您的文件或路径使用 在执行命令之前,先做bk的更改

sudo rm -r /path/to/dir/

后:

svn up and commit or delete 

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