views:

59

answers:

3

Why the hell would I suddenly be getting this svn error when I try to import files into my repo? What does it even have to do with notepad++?

Thanks :)

C:\xampp\htdocs\projects\lab>svn import c:/wordpress http://tasty.unfuddle.com/svn/tasty_lab/wordpress 'C:\Program' is not recognized as an internal or external command, operable program or batch file. svn: system('C:\Program Files\Notepad++\notepad++.exe svn-commit.tmp') returned 1

+3  A: 

Use short path for your %EDITOR% environment variable. That should fix the problem.

set EDITOR=C:\Progra~1\Notepad++\notepad++.exe

Or to make the change permanent:

  • Right-click My Computer
  • From the context menu select properties
  • Go to advanced system settings
  • Click on the Environment variables button
  • Change the value of EDITOR there
Alexandre Jasmin
How do I go about doing that?
Will
Awesome. Thank you so much :)
Will
+3  A: 

svn is trying to open your default editor to let you enter a commit message, and fails. I have no idea how to alter the default editor in Windows (in linux it would be something like export EDITOR=/path/to/editor.

Until someone explains how to alter your default editor, you can circumvent this temporarily by either entering the comment directly with -m'Comment', or providing --editor-cmd

Wrikken
OOOOH. So basically I'm leaving off my -m!
Will
A: 

I don't have the complete answer, but the reason it's returning a Notepad++ error is because that's your default text editor. SVN is trying to open that up so you can write a log message, but failing, presumably because it's choking on the space in "Program Files". Try fixing the global environment variable for your default text editor. I forget what it's called, but it shouldn't be hard to find.

If you need a quick hack to allow you to import so you aren't blocked right now, then run svn import -m "Logging Message Goes Here" C:/files/I/want/to/import

warandpeace
A-ha, Alexandre Jasmin has the editor variable solution.
warandpeace