我对我们正在使用的文件进行了小改动,并且要提交我的编辑。svn commit失败,但是我的编辑修改了回购版中的旧版本
$ svn commit -m "comment"
Sending pom.xml
svn: E160042: Commit failed (details follow):
svn: E160042: File or directory 'pom.xml' is out of date; try updating
svn: E160024: resource out of date; try updating
AFAIK,现在没有什么应该改变回购,对吧? 显然有人做了一个更改,我忘了在编辑文件之前更新我的工作副本,我更新了。
$ svn update
Updating '.':
U another.unrelated.file
G pom.xml
Updated to revision 11943.
正如预期的那样,我们的更改被合并(进入我的工作副本,对吧?),所以我检查了状态。
$ svn status
没有变化?为什么? pom.xml的合并工作副本是否应该标记为已修改? 我运行svn info
看看发生了什么。
$ svn info
Path: .
Working Copy Root Path: working/dir
URL: https://not.relevant
Repository Root: https://not.relevant
Repository UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Revision: 11943
Node Kind: directory
Schedule: normal
Last Changed Author: otherguy
Last Changed Rev: 11856
Last Changed Date: 2012-01-04 16:12:42 +0100 (Wed, 04 Jan 2012)
不应该“上次更改”我的变化,而不是一个由otherguy 18天以前?所以我把这个回购文件放在那里看看有什么是真实的。
svn cat https://company.com/repo/path/to/pom.xml | less
它显示文件的合并版本! (随着我和其他人的改变)。
这里发生了什么? svn是否在不更新任何元数据的情况下使用我的更改更改文件的现有修订版本?这甚至有可能吗?
原来他人做了和我一样的改变,所以我的提交从未做出(或需要)。 – 2012-01-12 12:54:31