]> git.lyx.org Git - features.git/commitdiff
Enable lyx2lyx to work with "file names with spaces".
authorAngus Leeming <leeming@lyx.org>
Thu, 19 May 2005 08:43:52 +0000 (08:43 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 19 May 2005 08:43:52 +0000 (08:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9954 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/lyx2lyx
src/ChangeLog
src/buffer.C

index 48525fe8279e66e87607385592a2d238c18e1475..f67ced34c618729bb643f802f7fe8f96e0494472 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-18  Angus Leeming  <leeming@lyx.org>
+
+       * lyx2lyx (parse_options): Add the description of the '-f' option
+       back again.
+
 2005-05-18  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * lyx_1_4.py (convert_breaks): Don't treat every token that starts
@@ -5,7 +10,8 @@
 
 2005-05-06  José Matos  <jamatos@lyx.org>
 
-       * lyx_1_4.py (convert_breaks): put all paragraph parameters into a single line.
+       * lyx_1_4.py (convert_breaks): put all paragraph parameters into a
+       single line.
 
 2005-05-04  José Matos  <jamatos@lyx.org>
 
 
        * lyx_1_4.py (convert_frameless_box): Replace instead of adding
        new code.
-.
+
 2004-04-14  José Matos  <jamatos@lyx.org>
 
        * error.py
        * lyxconvert_223.py:
        * lyxconvert_224.py (convert_minipage): move funtion to its right place.
        (convert_breaks): convert line and page break, at bottom and top.
-
index f355240b5578a1409405f7649e496b2f13765b8d..7e27f056edbbe9e3a482302120197c2597c069b3 100755 (executable)
@@ -32,6 +32,7 @@ Options:
     -d, --debug level          level=0..2 (O_ no debug information, 2_verbose)
                                default: level=1
     -e, --err error_file       name of the error file or else goes to stderr
+    -f, --from version         initial version (optional)
     -t, --to version           final version (optional)
     -o, --output name          name of the output file or else goes to stdout
     -q, --quiet                        same as --debug=0"""
index b1634c33646c7e0b218aa98d1ba92d819f1c6482..a459de52989f5fdfe02500759681b01dc250a701 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-18  Angus Leeming  <leeming@lyx.org>
+
+       * buffer.C (readFile): Quote all file names passed to lyx2lyx.
+
 2005-05-12  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * tabular.[hC]: added setCellInset to fix tabular paste.
index 90cc72c46fc8a4b0bfbaa43ec0b35201850b1400..ca87c4c425ad134b9786bc70e651c085737db435 100644 (file)
@@ -638,9 +638,8 @@ bool Buffer::readFile(LyXLex & lex, string const & filename, pit_type const pit)
                                              filename));
                        return false;
                }
-               string command =
-                       "python " + LibFileSearch("lyx2lyx", "lyx2lyx");
-               if (command.empty()) {
+               string const lyx2lyx = LibFileSearch("lyx2lyx", "lyx2lyx");
+               if (lyx2lyx.empty()) {
                        Alert::error(_("Conversion script not found"),
                                     bformat(_("%1$s is from an earlier"
                                               " version of LyX, but the"
@@ -649,14 +648,18 @@ bool Buffer::readFile(LyXLex & lex, string const & filename, pit_type const pit)
                                               filename));
                        return false;
                }
-               command += " -t"
-                       + convert<string>(LYX_FORMAT)
-                       + " -o " + tmpfile + ' '
-                       + QuoteName(filename);
+               ostringstream command;
+               command << "python " << QuoteName(lyx2lyx)
+                       << " -t " << convert<string>(LYX_FORMAT)
+                       << " -o " << QuoteName(tmpfile) << ' '
+                       << QuoteName(filename);
+               string const command_str = command.str();
+
                lyxerr[Debug::INFO] << "Running '"
-                                   << command << '\''
+                                   << command_str << '\''
                                    << endl;
-               cmd_ret const ret = RunCommand(command);
+
+               cmd_ret const ret = RunCommand(command_str);
                if (ret.first != 0) {
                        Alert::error(_("Conversion script failed"),
                                     bformat(_("%1$s is from an earlier version"