[PATCH] Detect cvs & svn directories more accurately
- From: Vincent Legoll <vincent legoll gmail com>
- To: meld-list gnome org
- Subject: [PATCH] Detect cvs & svn directories more accurately
- Date: Tue, 24 Feb 2009 21:41:36 +0100
Use os.path.isdir() instead of exists() as it more accurately detects
a CVS or subversion handled working copy.
--
Vincent Legoll
Index: vc/cvs.py
===================================================================
--- vc/cvs.py (révision 1157)
+++ vc/cvs.py (copie de travail)
@@ -35,7 +35,7 @@
PATCH_INDEX_RE = "^Index:(.*)$"
def __init__(self, location):
- if not os.path.exists("%s/CVS"% location):
+ if not os.path.isdir("%s/CVS" % location):
raise ValueError
self.root = location
Index: vc/svn.py
===================================================================
--- vc/svn.py (révision 1157)
+++ vc/svn.py (copie de travail)
@@ -34,7 +34,7 @@
PATCH_INDEX_RE = "^Index:(.*)$"
def __init__(self, location):
- if not os.path.exists("%s/.svn"%location):
+ if not os.path.isdir("%s/.svn" % location):
raise ValueError()
self.root = location
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]