meld r1207 - trunk/vc
- From: vincele svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1207 - trunk/vc
- Date: Mon,  2 Mar 2009 23:23:41 +0000 (UTC)
Author: vincele
Date: Mon Mar  2 23:23:41 2009
New Revision: 1207
URL: http://svn.gnome.org/viewvc/meld?rev=1207&view=rev
Log:
Take more code from patch #129869 of bug #556404
Take the hunk that uses exceptions to handle multiple
versions of monotone repository format.
This patch should be a noop.
I left the hunk removing os.path.normpath(), as this
could change behavior.
Modified:
   trunk/vc/monotone.py
Modified: trunk/vc/monotone.py
==============================================================================
--- trunk/vc/monotone.py	(original)
+++ trunk/vc/monotone.py	Mon Mar  2 23:23:41 2009
@@ -36,26 +36,19 @@
         self._tree_cache = None
         location = os.path.normpath(location)
 
-        # for monotone >= 0.26
-        mtn = self.find_repo_root(location, "_MTN", raiseError = False)
-        if mtn:
-            self.root = mtn
-
+        try:
+            # for monotone >= 0.26
+            self.root = self.find_repo_root(location, "_MTN")
             self.interface_version = float(os.popen("mtn" + " automate interface_version").read())
             if self.interface_version > 6.0:
                 print "WARNING: Unsupported interface version (please report any problems to the meld mailing list)"
-
             return
-
-        # for monotone <= 0.25 (different metadata directory, different executable)
-        mt = self.find_repo_root(location, "MT", raiseError = False)
-        if mt:
-            self.root = mt
+        except ValueError:
+            # for monotone <= 0.25 (different metadata directory, different executable)
+            self.root = self.find_repo_root(location, "MT")
             self.CMD = "monotone"
             return
 
-        raise ValueError
-
     def commit_command(self, message):
         return [self.CMD,"commit","-m",message]
     def diff_command(self):
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]