3

I wanted to commit a change in a file that is under subversion control:

svn ci some-file -m "some-comment"

but I receive a

svn: Commit failed (details follow):
svn: Revision file lacks trailing newline

from a quick search on the internet, I was unable to find an authorative answer how to proceed in such a case. So, if somebody here is knowledgable, I'd be very grateful.

Edit/Update: The version is:

c:\>svn --version
svn, version 1.6.5 (r38866)
   compiled Sep  1 2009, 13:23:06

and

c:\>svnadmin, version 1.6.5 (r38866)
   compiled Sep  1 2009, 13:23:06

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules are available:

* fs_fs : Module for working with a plain file (FSFS) repository.
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
  • It's possible this is a hook of some kind installed to ensure that everything you check in has a trailing newline. However that's just a guess. – Chris Eberle Sep 04 '11 at 18:45
  • I doubt it's a hook since I have been working with this repository and/or project since long and have already done many commits and work with an editor that automatically appends new lines at the end of the (text-) file. – René Nyffenegger Sep 04 '11 at 20:31

1 Answers1

2

This is a repository message. What version of Subversion are you using. This is a very old error that has been fixed long ago.

It took me a while, but I found the fix.

This is a problem in the repository itself and not the client.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • I take it from the link you posted that *very old* refers to version 1.2. Right? My svn versions are 1.6 (both `svnadmin` with which I created the repository and `svn` with which I commit, update and the like) – René Nyffenegger Sep 05 '11 at 05:58
  • It was an old problem when FSFS was first used. However, I haven't seen it in years. It apparently points to a repository corruption issue, and the directions tell you how to remove the last revision of the repository where the error is probably located. Back up your repository first. You can also try a dump and load and see if that removed the error. – David W. Sep 05 '11 at 20:11