meld r1243 - trunk/vc
- From: vincele svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1243 - trunk/vc
- Date: Mon, 9 Mar 2009 22:11:03 +0000 (UTC)
Author: vincele
Date: Mon Mar 9 22:11:03 2009
New Revision: 1243
URL: http://svn.gnome.org/viewvc/meld?rev=1243&view=rev
Log:
_vc.Vc.find_repo_root() has no user passing subdir or raiseError parameters, remove them.
Set monotone's VC_DIR attribute
Modified:
trunk/vc/_vc.py
trunk/vc/monotone.py
Modified: trunk/vc/_vc.py
==============================================================================
--- trunk/vc/_vc.py (original)
+++ trunk/vc/_vc.py Mon Mar 9 22:11:03 2009
@@ -73,7 +73,7 @@
VC_DIR = None
def __init__(self, location):
- self.root = self.find_repo_root(location, self.VC_DIR)
+ self.root = self.find_repo_root(location)
def commit_command(self, message):
raise NotImplementedError()
@@ -90,17 +90,15 @@
def patch_command(self, workdir):
return ["patch","--strip=%i"%self.PATCH_STRIP_NUM,"--reverse","--directory=%s" % workdir]
- def find_repo_root(self, start, subdir, raiseError = True):
+ def find_repo_root(self, start):
while True:
- if os.path.isdir(os.path.join(start, subdir)):
+ if os.path.isdir(os.path.join(start, self.VC_DIR)):
return start
tmp = os.path.dirname(start)
if tmp == start:
break
start = tmp
- if raiseError:
- raise ValueError()
- return None
+ raise ValueError()
def cache_inventory(self, topdir):
pass
Modified: trunk/vc/monotone.py
==============================================================================
--- trunk/vc/monotone.py (original)
+++ trunk/vc/monotone.py Mon Mar 9 22:11:03 2009
@@ -38,14 +38,16 @@
try:
# for monotone >= 0.26
- self.root = self.find_repo_root(location, "_MTN")
+ self.VC_DIR = "_MTN"
+ self.root = self.find_repo_root(location)
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
except ValueError:
# for monotone <= 0.25 (different metadata directory, different executable)
- self.root = self.find_repo_root(location, "MT")
+ self.VC_DIR = "MT"
+ self.root = self.find_repo_root(location)
self.CMD = "monotone"
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]