meld r1191 - trunk/vc



Author: vincele
Date: Sun Mar  1 23:27:19 2009
New Revision: 1191
URL: http://svn.gnome.org/viewvc/meld?rev=1191&view=rev

Log:
Detect cvs & svn repositories more accurately:
avoid /PATH/TO/{CVS,.svn} if they are plain files


Modified:
   trunk/vc/cvs.py
   trunk/vc/svn.py

Modified: trunk/vc/cvs.py
==============================================================================
--- trunk/vc/cvs.py	(original)
+++ trunk/vc/cvs.py	Sun Mar  1 23:27:19 2009
@@ -36,7 +36,7 @@
     PATCH_INDEX_RE = "^Index:(.*)$"
 
     def __init__(self, location):
-        if not os.path.exists(os.path.join(location, self.VC_DIR)):
+        if not os.path.isdir(os.path.join(location, self.VC_DIR)):
             raise ValueError
         self.root = location
 

Modified: trunk/vc/svn.py
==============================================================================
--- trunk/vc/svn.py	(original)
+++ trunk/vc/svn.py	Sun Mar  1 23:27:19 2009
@@ -34,7 +34,7 @@
     PATCH_INDEX_RE = "^Index:(.*)$"
 
     def __init__(self, location):
-        if not os.path.exists(os.path.join(location, self.VC_DIR)):
+        if not os.path.isdir(os.path.join(location, self.VC_DIR)):
             raise ValueError()
         self.root = location
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]