예제 #1
0
	def __init__(self, pathname = None, verbose = False):
		self.mGitSvnRepoName = ".cavan-git-svn-repo"

		CavanCommandBase.__init__(self, pathname, verbose)
		CavanProgressBar.__init__(self)

		self.mErrorCount = 0
		self.mLockProject = threading.Lock()
		self.mPathTempProject = "/tmp/cavan-git-svn-repo"

		self.mDepthMap = {}
		self.mDepthMap["build"] = 0
		self.mDepthMap["libcore"] = 0
		self.mDepthMap["pdk"] = 0
		self.mDepthMap["abi"] = 0
		self.mDepthMap["development"] = 0
		self.mDepthMap["bionic"] = 0
		self.mDepthMap["cts"] = 0
		self.mDepthMap["dalvik"] = 0
		self.mDepthMap["gdk"] = 0
		self.mDepthMap["sdk"] = 0
		self.mDepthMap["tools"] = 1
		self.mDepthMap["system"] = 1
		self.mDepthMap["external"] = 1
		self.mDepthMap["packages"] = 2
		self.mDepthMap["hardware"] = 1
		self.mDepthMap["device"] = 1
		self.mDepthMap["bootable"] = 2
		self.mDepthMap["frameworks"] = 2
		self.mDepthMap["frameworks/base"] = 0
		self.mDepthMap["prebuilts"] = 4
		self.mDepthMap["release"] = -1
예제 #2
0
	def setRootPath(self, pathname, auto_create = False):
		CavanCommandBase.setRootPath(self, pathname, auto_create)

		self.mPathSvnRepo = self.getAbsPath(self.mGitSvnRepoName)
		if auto_create and not os.path.isdir(self.mPathSvnRepo):
			self.mkdirSafe(self.mPathSvnRepo)

		self.mPathProjects = os.path.join(self.mPathSvnRepo, "projects")
		if auto_create and not self.mPathProjects:
			self.mkdirSafe(self.mPathProjects)

		self.mFileManifest = os.path.join(self.mPathSvnRepo, "manifest.xml")
		if not os.path.exists(self.mFileManifest):
			pathname = self.getAbsPath(".repo")
			if os.path.exists(pathname):
				self.mPathSvnRepo = pathname
				pathname = os.path.join(pathname, "manifest.xml")
				if os.path.exists(pathname):
					self.mFileManifest = pathname

		self.mFileFailed = os.path.join(self.mPathSvnRepo, "failed.txt")

		self.mPathPlatform = os.path.join(self.mPathProjects, "platform")
		if auto_create and not os.path.isdir(self.mPathPlatform):
			self.mkdirSafe(self.mPathPlatform)

		self.mPathManifestRepo = os.path.join(self.mPathPlatform, "manifest.git")
		self.mPathFileRepo = os.path.join(self.mPathPlatform, "copyfile.git")
		self.mPathManifests = os.path.join(self.mPathSvnRepo, "manifests")
예제 #3
0
	def __init__(self, pathname = ".", verbose = True, name = None, bare = False):
		if not name:
			name = ".git"

		self.mGitRepoName = name;
		self.mBare = bare;
		CavanCommandBase.__init__(self, pathname, verbose)
예제 #4
0
    def __init__(self, pathname=".", verbose=True, name=None, bare=False):
        if not name:
            name = ".git"

        self.mGitRepoName = name
        self.mBare = bare
        CavanCommandBase.__init__(self, pathname, verbose)
예제 #5
0
	def __init__(self, verbose = False):
		CavanCommandBase.__init__(self, verbose = verbose)
		self.mPatternIfName = re.compile("(^[^\\s]+[0-9]*)\\s+Link encap:([^\\s]+)")
		self.mPatternInetAddr = re.compile("^\\s+inet addr:([0-9\\.]+).*Mask:([0-9\\.]+)")
		self.mPatternHwaddr = re.compile(".*HWaddr\\s+([0-9a-z:]+)")
		self.mPatternBroadcast = re.compile(".*Bcast:([^\\s]+)")
		self.mPatternIpaddrV6 = re.compile("^\\s+inet6 addr:\\s+([^\\s]+)\\s+Scope:([^\\s]+)")
		self.mPatternMtu = re.compile(".*MTU:([0-9]+)")
예제 #6
0
	def __init__(self, pathCavanMain = None):
		CavanCommandBase.__init__(self)
		if not pathCavanMain or not os.path.isfile(pathCavanMain):
			self.mServiceCommand = "cavan-tcp_dd_server"
			self.mCliendCommand = "cavan-alarm"
			self.mCavanMain = None
		else:
			self.mCavanMain = pathCavanMain
예제 #7
0
 def __init__(self, pathCavanMain=None):
     CavanCommandBase.__init__(self)
     if not pathCavanMain or not os.path.isfile(pathCavanMain):
         self.mServiceCommand = "cavan-tcp_dd_server"
         self.mCliendCommand = "cavan-alarm"
         self.mCavanMain = None
     else:
         self.mCavanMain = pathCavanMain
예제 #8
0
 def __init__(self, verbose=False):
     CavanCommandBase.__init__(self, verbose=verbose)
     self.mPatternIfName = re.compile(
         "(^[^\\s]+[0-9]*)\\s+Link encap:([^\\s]+)")
     self.mPatternInetAddr = re.compile(
         "^\\s+inet addr:([0-9\\.]+).*Mask:([0-9\\.]+)")
     self.mPatternHwaddr = re.compile(".*HWaddr\\s+([0-9a-z:]+)")
     self.mPatternBroadcast = re.compile(".*Bcast:([^\\s]+)")
     self.mPatternIpaddrV6 = re.compile(
         "^\\s+inet6 addr:\\s+([^\\s]+)\\s+Scope:([^\\s]+)")
     self.mPatternMtu = re.compile(".*MTU:([0-9]+)")
예제 #9
0
    def setRootPath(self, pathname, auto_create=False):
        CavanCommandBase.setRootPath(self, pathname, auto_create)

        if self.mBare:
            self.mPathGitRepo = self.mPathRoot
        else:
            self.mPathGitRepo = self.getAbsPath(self.mGitRepoName)
            self.mPathPatch = os.path.join(self.mPathGitRepo, "cavan-patch")
            if auto_create and not os.path.isdir(self.mPathPatch):
                self.mkdirSafe(self.mPathPatch)

        self.mFileExclude = os.path.join(self.mPathGitRepo, "info/exclude")
예제 #10
0
	def setRootPath(self, pathname, auto_create = False):
		CavanCommandBase.setRootPath(self, pathname, auto_create)

		if self.mBare:
			self.mPathGitRepo = self.mPathRoot
		else:
			self.mPathGitRepo = self.getAbsPath(self.mGitRepoName)
			self.mPathPatch = os.path.join(self.mPathGitRepo, "cavan-patch")
			if auto_create and not os.path.isdir(self.mPathPatch):
				self.mkdirSafe(self.mPathPatch)

		self.mFileExclude = os.path.join(self.mPathGitRepo, "info/exclude")
예제 #11
0
파일: cavan_adb.py 프로젝트: bgtwoigu/cavan
    def __init__(self, pathname=None, verbose=True):
        CavanCommandBase.__init__(self, pathname, verbose)
        self.setAdbDevice()
        self.mHost = self.getEnv("ADB_HOST")
        if not self.mHost:
            self.mHost = None

        self.mPort = self.getEnv("ADB_PORT")
        if not self.mPort:
            self.mPort = "9999"

        self.TempPath = "/data/local/tmp"
        self.ApkTempPath = os.path.join(self.TempPath, "cavan.apk")
예제 #12
0
파일: cavan_adb.py 프로젝트: FuangCao/cavan
	def __init__(self, pathname = None, verbose = True):
		CavanCommandBase.__init__(self, pathname, verbose)
		self.setAdbDevice()
		self.mHost = self.getEnv("ADB_HOST")
		if not self.mHost:
			self.mHost = None

		self.mPort = self.getEnv("ADB_PORT")
		if not self.mPort:
			self.mPort = "9999"

		self.TempPath = "/data/local/tmp"
		self.ApkTempPath = os.path.join(self.TempPath, "cavan.apk")
예제 #13
0
	def __init__(self, pathname, verbose = False):
		CavanCommandBase.__init__(self, pathname, verbose)
		self.setAdbDevice()