[UPD] format script
This commit is contained in:
parent
7ed6939907
commit
6348c7d15a
15 changed files with 48 additions and 17 deletions
|
|
@ -7,7 +7,9 @@ import sys
|
||||||
from git import Repo
|
from git import Repo
|
||||||
from retrying import retry # pip install retrying
|
from retrying import retry # pip install retrying
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script import fork_github_repo
|
from script import fork_github_repo
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ import sys
|
||||||
import git
|
import git
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ import sys
|
||||||
from git import Repo
|
from git import Repo
|
||||||
from retrying import retry # pip install retrying
|
from retrying import retry # pip install retrying
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ import sys
|
||||||
|
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@ import sys
|
||||||
|
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@ import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ import sys
|
||||||
import git
|
import git
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ from colorama import Fore, Style
|
||||||
from git import Repo
|
from git import Repo
|
||||||
from git.exc import GitCommandError, NoSuchPathError
|
from git.exc import GitCommandError, NoSuchPathError
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ import sys
|
||||||
from git import Repo # pip install gitpython
|
from git import Repo # pip install gitpython
|
||||||
from retrying import retry # pip install retrying
|
from retrying import retry # pip install retrying
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
@ -57,7 +59,10 @@ def main():
|
||||||
repo_path=config.dir, add_repo_root=False
|
repo_path=config.dir, add_repo_root=False
|
||||||
)
|
)
|
||||||
if config.start_at >= len(lst_repo):
|
if config.start_at >= len(lst_repo):
|
||||||
raise Exception(f"Argument start_at need to be less then size of repo '{len(lst_repo)}'")
|
raise Exception(
|
||||||
|
"Argument start_at need to be less then size of repo"
|
||||||
|
f" '{len(lst_repo)}'"
|
||||||
|
)
|
||||||
lst_repo_organization = [
|
lst_repo_organization = [
|
||||||
git_tool.get_transformed_repo_info_from_url(
|
git_tool.get_transformed_repo_info_from_url(
|
||||||
a.get("url"),
|
a.get("url"),
|
||||||
|
|
@ -68,7 +73,7 @@ def main():
|
||||||
revision=a.get("revision"),
|
revision=a.get("revision"),
|
||||||
clone_depth=a.get("clone_depth"),
|
clone_depth=a.get("clone_depth"),
|
||||||
)
|
)
|
||||||
for a in lst_repo[config.start_at:]
|
for a in lst_repo[config.start_at :]
|
||||||
]
|
]
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ from pathlib import Path
|
||||||
from git import Repo # pip install gitpython
|
from git import Repo # pip install gitpython
|
||||||
from git.exc import GitCommandError
|
from git.exc import GitCommandError
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ import sys
|
||||||
import git
|
import git
|
||||||
from unidiff import PatchSet
|
from unidiff import PatchSet
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ from colorama import Fore, Style
|
||||||
from git import Repo # pip install gitpython
|
from git import Repo # pip install gitpython
|
||||||
from retrying import retry # pip install retrying
|
from retrying import retry # pip install retrying
|
||||||
|
|
||||||
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
new_path = os.path.normpath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
|
)
|
||||||
sys.path.append(new_path)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git.git_tool import GitTool
|
from script.git.git_tool import GitTool
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ import time
|
||||||
import uuid
|
import uuid
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
import git
|
|
||||||
|
|
||||||
import aioshutil
|
import aioshutil
|
||||||
|
import git
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue