mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-21 17:52:14 +01:00
Load most of the modules in commandline.py on-demand
This commit is contained in:
parent
c7b8f25fe6
commit
7ed288b838
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,7 @@
|
|||||||
import difflib
|
import difflib
|
||||||
|
|
||||||
import osc.commandline
|
import osc.commandline
|
||||||
from .. import obs_api
|
|
||||||
from .. import oscerr
|
from .. import oscerr
|
||||||
from ..output import get_user_input
|
|
||||||
|
|
||||||
|
|
||||||
class RepoAddCommand(osc.commandline.OscCommand):
|
class RepoAddCommand(osc.commandline.OscCommand):
|
||||||
@ -54,6 +52,9 @@ class RepoAddCommand(osc.commandline.OscCommand):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
|
from .. import obs_api
|
||||||
|
from ..output import get_user_input
|
||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
for path in args.paths:
|
for path in args.paths:
|
||||||
if "/" not in path:
|
if "/" not in path:
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import osc.commandline
|
import osc.commandline
|
||||||
from .. import obs_api
|
|
||||||
from ..output import KeyValueTable
|
|
||||||
|
|
||||||
|
|
||||||
class RepoListCommand(osc.commandline.OscCommand):
|
class RepoListCommand(osc.commandline.OscCommand):
|
||||||
@ -19,6 +17,9 @@ class RepoListCommand(osc.commandline.OscCommand):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
|
from .. import obs_api
|
||||||
|
from ..output import KeyValueTable
|
||||||
|
|
||||||
project_obj = obs_api.Project.from_api(args.apiurl, args.project)
|
project_obj = obs_api.Project.from_api(args.apiurl, args.project)
|
||||||
repo_flags = project_obj.resolve_repository_flags()
|
repo_flags = project_obj.resolve_repository_flags()
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import difflib
|
import difflib
|
||||||
|
|
||||||
import osc.commandline
|
import osc.commandline
|
||||||
from .. import obs_api
|
|
||||||
from .. import oscerr
|
from .. import oscerr
|
||||||
from ..output import get_user_input
|
|
||||||
|
|
||||||
|
|
||||||
class RepoRemoveCommand(osc.commandline.OscCommand):
|
class RepoRemoveCommand(osc.commandline.OscCommand):
|
||||||
@ -34,6 +32,9 @@ class RepoRemoveCommand(osc.commandline.OscCommand):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
|
from .. import obs_api
|
||||||
|
from ..output import get_user_input
|
||||||
|
|
||||||
project_obj = obs_api.Project.from_api(args.apiurl, args.project)
|
project_obj = obs_api.Project.from_api(args.apiurl, args.project)
|
||||||
old = project_obj.to_string()
|
old = project_obj.to_string()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user