Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
6a7042fe
Commit
6a7042fe
authored
Jul 09, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move git_status to sysinfo
parent
72cfa282
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
modules/launch_utils.py
modules/launch_utils.py
+0
-9
modules/sysinfo.py
modules/sysinfo.py
+6
-1
No files found.
modules/launch_utils.py
View file @
6a7042fe
...
@@ -85,14 +85,6 @@ def git_tag():
...
@@ -85,14 +85,6 @@ def git_tag():
return
"<none>"
return
"<none>"
@
lru_cache
()
def
git_status
():
try
:
return
subprocess
.
check_output
([
git
,
"-C"
,
script_path
,
"status"
],
shell
=
False
,
encoding
=
'utf8'
)
.
strip
()
except
Exception
as
e
:
return
str
(
e
)
def
run
(
command
,
desc
=
None
,
errdesc
=
None
,
custom_env
=
None
,
live
:
bool
=
default_command_live
)
->
str
:
def
run
(
command
,
desc
=
None
,
errdesc
=
None
,
custom_env
=
None
,
live
:
bool
=
default_command_live
)
->
str
:
if
desc
is
not
None
:
if
desc
is
not
None
:
print
(
desc
)
print
(
desc
)
...
@@ -453,7 +445,6 @@ def prepare_environment():
...
@@ -453,7 +445,6 @@ def prepare_environment():
exit
(
0
)
exit
(
0
)
def
configure_for_tests
():
def
configure_for_tests
():
if
"--api"
not
in
sys
.
argv
:
if
"--api"
not
in
sys
.
argv
:
sys
.
argv
.
append
(
"--api"
)
sys
.
argv
.
append
(
"--api"
)
...
...
modules/sysinfo.py
View file @
6a7042fe
...
@@ -106,7 +106,7 @@ def get_dict():
...
@@ -106,7 +106,7 @@ def get_dict():
"Python"
:
platform
.
python_version
(),
"Python"
:
platform
.
python_version
(),
"Version"
:
launch_utils
.
git_tag
(),
"Version"
:
launch_utils
.
git_tag
(),
"Commit"
:
launch_utils
.
commit_hash
(),
"Commit"
:
launch_utils
.
commit_hash
(),
"Git status"
:
launch_utils
.
git_status
(
),
"Git status"
:
git_status
(
paths_internal
.
script_path
),
"Script path"
:
paths_internal
.
script_path
,
"Script path"
:
paths_internal
.
script_path
,
"Data path"
:
paths_internal
.
data_path
,
"Data path"
:
paths_internal
.
data_path
,
"Extensions dir"
:
paths_internal
.
extensions_dir
,
"Extensions dir"
:
paths_internal
.
extensions_dir
,
...
@@ -168,6 +168,11 @@ def run_git(path, *args):
...
@@ -168,6 +168,11 @@ def run_git(path, *args):
return
str
(
e
)
return
str
(
e
)
def
git_status
(
path
):
if
(
Path
(
path
)
/
'.git'
)
.
is_dir
():
return
run_git
(
paths_internal
.
script_path
,
'status'
)
def
get_info_from_repo_path
(
path
:
Path
):
def
get_info_from_repo_path
(
path
:
Path
):
is_repo
=
(
path
/
'.git'
)
.
is_dir
()
is_repo
=
(
path
/
'.git'
)
.
is_dir
()
return
{
return
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment