我對我們正在使用的文件進行了小改動,並且要提交我的編輯。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