Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit failed error when committing new version to svn repository

I'm trying to commit a new version to my SVN repository but am met with this error:

svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found new-computers-computer:trunk newcomputer$

What's wrong?

like image 551
Justin Meltzer Avatar asked Oct 11 '10 01:10

Justin Meltzer


People also ask

How do I commit changes to svn repository?

Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.

Is out of date svn commit failed?

An svn commit of the file will fail with an “out-of-date” error. The file should be updated first; an svn update command will attempt to merge the public changes with the local changes. If Subversion can't complete the merge in a plausible way automatically, it leaves it to the user to resolve the conflict.

How check svn commit version?

To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.

What is svn commit and update?

Commit uploads your changes on the CVS / SVN server, and Update overwrites the files on your localhost with the ones on the server.


1 Answers

Justin,

Every time you commit with Subversion, you need to write a summary of what is being committed (i.e. the commit message). The error is because Subversion is trying to launch a text editor so that you can write a commit message, but the editor is never being launched. Setting the SVN_EDITOR in your .bash_profile will do the trick. Here are some detailed step-by-step instructions on how to set vim as the default editor used by svn: Original link dead, replaced with archive.is mirror

Alternatively, as suggested in error message, you can load a commit message from an existing file with -f, or pass in a message with -m.

Examples:

svn commit -m "Fixed a regression that prevented pigs from flying (resolves issue #123, but causes strange behavior elsewhere)" svn commit -f /path/to/a/file/with/a/long/commit/message.txt 
like image 102
Blackcoat Avatar answered Oct 12 '22 01:10

Blackcoat