tags:

views:

144

answers:

4

When I run:

svn commit -m "some message" myFile.txt

in the DOS shell, it gives me an empty line as the result. There's no error message, etc. And the file is not committed.

What could be causing this?

+4  A: 

most likely there are no changes. Try svn status

johannes
It returns nothing...
Stephane Grenier
That means there are no changes.
balpha
But I can guarantee there are changes, I modified the file the second before.What could cause this?
Stephane Grenier
I know it seems obvious, but did you edit the correct copy of the file? Also try svn diff myFile.txt. My guess is that will return nothing too.
Chris Kloberdanz
Did you save the file? I know, it sounds stupid, but I sometimes find myself commiting things without saving them before.
Tomas Markauskas
if `svn diff filename` returns nothing, then there are no changes from what is in the repository.
Ether
What's interesting is that I changed the file again a few minutes later and it works.All of a sudden it works, then it doesn't again. I wait some time, re-change teh file, and voila it works...
Stephane Grenier
+1  A: 

Did you svn add myFile.txt first?

You can only commit changes to files that are added to svn.

Brian R. Bondy
Yes, it's already included in the repository
Stephane Grenier
Wouldn't it say that myFile.txt is not under version control, though?
Chris Kloberdanz
Possibly it would
Brian R. Bondy
+1  A: 

Do "svn st myFile.txt". If the first column has a ? in it, then the file isn't under source control and you need to "svn add myFile.txt". If the first column is blank, then there aren't any changes to commit. If the first column is something else, then "svn help st" will give you the meaning of the other possible flags.

Dewayne Christensen
+1  A: 

If the file really was modified (i.e., you didn't just forget to save your changes), then you should check the conditions which make a file appear as modified for Subversion:

  1. has the 'last modification' date and/or the file size changed?
  2. if not: file is not modified
  3. if yes: compare file content with the BASE file
  4. stop at the first byte that differs, mark the file as modified
  5. if no byte differs regarding to BASE, mark the file as not-modified
Stefan