]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/LyX.py
Trac browse SVN -> GIT
[lyx.git] / lib / lyx2lyx / LyX.py
index 2ee838b3cfd51540c71fdeae5f70699d80c51724..9a4763870e9eb0c6231db44877ddf3b70ebb3418 100644 (file)
@@ -1,5 +1,6 @@
 # This file is part of lyx2lyx
 # -*- coding: utf-8 -*-
+# Copyright (C) 2002-2011 The LyX Team
 # Copyright (C) 2002-2004 Dekel Tsur <dekel@lyx.org>
 # Copyright (C) 2002-2006 José Matos <jamatos@lyx.org>
 #
@@ -15,7 +16,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 " The LyX module has all the rules related with different lyx file formats."
 
@@ -32,7 +33,7 @@ try:
     import lyx2lyx_version
     version__ = lyx2lyx_version.version
 except: # we are running from build directory so assume the last version
-    version__ = '2.0'
+    version__ = '2.1'
 
 default_debug__ = 2
 
@@ -80,8 +81,10 @@ format_relation = [("0_06",    [200], minor_versions("0.6" , 4)),
                    ("1_3",     [221], minor_versions("1.3" , 7)),
                    ("1_4", range(222,246), minor_versions("1.4" , 5)),
                    ("1_5", range(246,277), minor_versions("1.5" , 7)),
-                   ("1_6", range(277,346), minor_versions("1.6" , 0)),
-                   ("2_0",     [],    minor_versions("2.0", 0))]
+                   ("1_6", range(277,346), minor_versions("1.6" , 10)),
+                   ("2_0", range(347,414), minor_versions("2.0", 0)),
+                   ("2_1",     [], minor_versions("2.1", 0))
+                  ]
 
 ####################################################################
 # This is useful just for development versions                     #
@@ -124,7 +127,11 @@ def format_info():
 
 def get_end_format():
     " Returns the more recent file format available."
-    return format_relation[-1][1][-1]
+    # this check will fail only when we have a new version
+    # and there is no format change yet.
+    if format_relation[-1][1]:
+      return format_relation[-1][1][-1]
+    return format_relation[-2][1][-1]
 
 
 def get_backend(textclass):