[svk-commit] r3087 - trunk/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Fri Sep 12 02:32:27 EDT 2008


Author: clsung
Date: Fri Sep 12 02:32:27 2008
New Revision: 3087

Modified:
   trunk/lib/SVK/Util.pm

Log:
- fix Win32 edit_file problem
  - http://task.hm/HJIA

Submitted by: Cornelius <cornelius dot howl_AT_gmail dot com>
Reviewed by: clsung

Modified: trunk/lib/SVK/Util.pm
==============================================================================
--- trunk/lib/SVK/Util.pm	(original)
+++ trunk/lib/SVK/Util.pm	Fri Sep 12 02:32:27 2008
@@ -257,6 +257,18 @@
 			: DEFAULT_EDITOR; # fall back to something
     my @editor = split (/ /, $editor);
 
+    if ( IS_WIN32 ) {
+        my $o;
+        my $e = shift @editor;
+        $e =~ s/^"//;
+        while ( !defined($o = can_run ($e)) ) {
+            die loc ("Can not find the editor: %1\n", $e) unless @editor;
+            $e .= " ".shift @editor;
+            $e =~ s/"$//;
+        }
+        unshift @editor, $o;
+    }
+
     $logger->info(loc("Waiting for editor..."));
 
     # XXX: check $?


More information about the svk-commit mailing list