예제 #1
0
        except Exception, e:
            getLogger().warning("Unable to unlink %s: %s" %
                                (profilefilename, str(e)))
            return False
        rev = c.checkin([profilefilename],
                        log_message="Removed profile %s for %s" %
                        (profilename, localname))
        getLogger().info("New revision created: %s" % rev.number)
        return True

    def profileattributes(self, filename, profilename):
        filename = self._realpath(filename)
        if not filename:
            return None

        profilefilename = "%s.profiles/%s" % (filename, profilename)

        try:
            s = os.stat(profilefilename)
            a = FileSystemBackend.Attributes()
            a.mtime = s.st_ctime
            a.size = s.st_size
            return a
        except Exception, e:
            getLogger().warning("Unable to get file attributes for %s: %s" %
                                (profilefilename, str(e)))
        return None


FileSystemBackendManager.registerFileSystemBackendClass("svn", SvnBackend)
예제 #2
0
			return None
		
		profilefilename = "%s.profiles/%s" % (filename, profilename)
		try:
			os.remove(profilefilename)
			return True
		except Exception, e:
			getLogger().warning("Unable to unlink %s: %s" % (profilefilename, str(e)))
		return False
		

	def profileattributes(self, filename, profilename):
		filename = self._realpath(filename)
		if not filename: 
			return None

		profilefilename = "%s.profiles/%s" % (filename, profilename)

		try:
			s = os.stat(profilefilename)
			a = FileSystemBackend.Attributes()
			a.mtime = s.st_ctime
			a.size = s.st_size
			return a
		except Exception, e:
			getLogger().warning("Unable to get file attributes for %s: %s" % (profilefilename, str(e)))			
		return None
	

FileSystemBackendManager.registerFileSystemBackendClass("local", LocalBackend)
예제 #3
0
        profilefilename = "%s.profiles/%s" % (filename, profilename)
        try:
            os.remove(profilefilename)
            return True
        except Exception, e:
            getLogger().warning("Unable to unlink %s: %s" %
                                (profilefilename, str(e)))
        return False

    def profileattributes(self, filename, profilename):
        filename = self._realpath(filename)
        if not filename:
            return None

        profilefilename = "%s.profiles/%s" % (filename, profilename)

        try:
            s = os.stat(profilefilename)
            a = FileSystemBackend.Attributes()
            a.mtime = s.st_ctime
            a.size = s.st_size
            return a
        except Exception, e:
            getLogger().warning("Unable to get file attributes for %s: %s" %
                                (profilefilename, str(e)))
        return None


FileSystemBackendManager.registerFileSystemBackendClass("local", LocalBackend)
예제 #4
0
                                (profilefilename, str(e)))
            return False

        self._repo.stage([profilelocalname])
        ret = self._repo.do_commit(
            message="Removed profile %s for %s" % (profilename, localname),
            committer=(username and username or self._defaultCommitter))
        getLogger().info("New revision created: %s" % ret)
        return True

    def profileattributes(self, filename, profilename):
        filename = self._realpath(filename)
        if not filename:
            return None

        profilefilename = "%s.profiles/%s" % (filename, profilename)

        try:
            s = os.stat(profilefilename)
            a = FileSystemBackend.Attributes()
            a.mtime = s.st_ctime
            a.size = s.st_size
            return a
        except Exception, e:
            getLogger().warning("Unable to get file attributes for %s: %s" %
                                (profilefilename, str(e)))
        return None


FileSystemBackendManager.registerFileSystemBackendClass("git", GitBackend)
예제 #5
0
		profilefilename = "%s.profiles/%s" % (filename, profilename)
		c = pysvn.Client()
		try:
			c.remove(profilefilename)
		except Exception, e:
			getLogger().warning("Unable to unlink %s: %s" % (profilefilename, str(e)))
			return False
		rev = c.checkin([profilefilename], log_message = "Removed profile %s for %s" % (profilename, localname))
		getLogger().info("New revision created: %s" % rev.number)
		return True
		
	def profileattributes(self, filename, profilename):
		filename = self._realpath(filename)
		if not filename: 
			return None

		profilefilename = "%s.profiles/%s" % (filename, profilename)

		try:
			s = os.stat(profilefilename)
			a = FileSystemBackend.Attributes()
			a.mtime = s.st_ctime
			a.size = s.st_size
			return a
		except Exception, e:
			getLogger().warning("Unable to get file attributes for %s: %s" % (profilefilename, str(e)))			
		return None
	

FileSystemBackendManager.registerFileSystemBackendClass("svn", SvnBackend)
예제 #6
0
		try:
			os.remove(profilefilename)
		except Exception, e:
			getLogger().warning("Unable to unlink %s: %s" % (profilefilename, str(e)))
			return False

		self._repo.stage([profilelocalname])
		ret = self._repo.do_commit(message = "Removed profile %s for %s" % (profilename, localname), committer = (username and username or self._defaultCommitter))
		getLogger().info("New revision created: %s" % ret)
		return True
		
	def profileattributes(self, filename, profilename):
		filename = self._realpath(filename)
		if not filename: 
			return None

		profilefilename = "%s.profiles/%s" % (filename, profilename)

		try:
			s = os.stat(profilefilename)
			a = FileSystemBackend.Attributes()
			a.mtime = s.st_ctime
			a.size = s.st_size
			return a
		except Exception, e:
			getLogger().warning("Unable to get file attributes for %s: %s" % (profilefilename, str(e)))			
		return None
	

FileSystemBackendManager.registerFileSystemBackendClass("git", GitBackend)