Reputation: 1231
I made a minor change to a file we're using, and was going to commit my edit.
$ 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, nothing should have changed in the repo now, right? Apparently someone had made a change and I had forgotten to update my working copy before editing the file, I update.
$ svn update
Updating '.':
U another.unrelated.file
G pom.xml
Updated to revision 11943.
As expected, our changes was merged (into my working copy, right?), so I check the status.
$ svn status
No change? Why? Shouldn't the merged working copy of pom.xml be marked as modified?
I run svn info
to see what's been going on.
$ 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)
Shouldn't "Last Changed" be my change instead of the one by otherguy 8 days ago? So I cat the repo file to see what's ACTUALLY there.
svn cat https://company.com/repo/path/to/pom.xml | less
And it shows the merged version of the file! (With the changes made by both me and otherguy).
What has happened here? Did svn change an existing revision of a file with my change without updating any metadata? Is that even possible?
Upvotes: 1
Views: 5018
Reputation: 42494
I think your working copy is still out of date.
The redbook says:
http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.cat.html
If your working copy is out of date (or you have local modifications) and you want to see the HEAD revision of a file in your working copy, svn cat -r HEAD FILENAME will automatically fetch the HEAD revision of the specified path:
Was your local pom.xml actually different from the one fetched from the repo?
Upvotes: 2