def scan_for_server_property(self, repository_info): def get_url_prop(path): url = execute(["svn", "propget", "reviewboard:url", path], with_errors=False).strip() return url or None for path in walk_parents(os.getcwd()): if not os.path.exists(os.path.join(path, ".svn")): break prop = get_url_prop(path) if prop: return prop return get_url_prop(repository_info.path)
def scan_for_server_property(self, repository_info): def get_url_prop(path): url = execute(["svn", "propget", "reviewboard:url", path]).strip() return url or None for path in walk_parents(os.getcwd()): if not os.path.exists(os.path.join(path, ".svn")): break prop = get_url_prop(path) if prop: return prop return get_url_prop(repository_info.path)
def scan_for_server_property(self, repository_info): def get_url_prop(path): url = self._run_svn(["propget", "reviewboard:url", path], with_errors=False, extra_ignore_errors=(1, )).strip() return url or None for path in walk_parents(os.getcwd()): if not os.path.exists(os.path.join(path, ".svn")): break prop = get_url_prop(path) if prop: return prop return get_url_prop(repository_info.path)