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)
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)
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)
(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)
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)
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)