Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
e3517048
Commit
e3517048
authored
13 years ago
by
Sebastien Luttringer
Browse files
Options
Downloads
Patches
Plain Diff
new display and option for command repo
repo have now -s and -u option new display and color
parent
42958993
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/is
+5
-5
5 additions, 5 deletions
bin/is
completion/bash/is
+1
-1
1 addition, 1 deletion
completion/bash/is
installsystems/repository.py
+9
-4
9 additions, 4 deletions
installsystems/repository.py
with
15 additions
and
10 deletions
bin/is
+
5
−
5
View file @
e3517048
...
...
@@ -304,7 +304,7 @@ def c_repo(parser, args):
repoman
=
load_repositories
(
args
)
for
pattern
in
args
.
repository
:
repoman
.
show_repos
(
pattern
,
online
=
args
.
online
,
local
=
args
.
local
,
url
=
args
.
verbose
,
state
=
not
args
.
no_
state
)
url
=
args
.
url
,
state
=
args
.
state
)
def
c_search
(
parser
,
args
):
'''
...
...
@@ -566,10 +566,10 @@ p_repo_mgroup.add_argument("-o", "--online", action="store_true", default=None,
help
=
"
list online repository (filter)
"
)
p_repo_mgroup
.
add_argument
(
"
-O
"
,
"
--offline
"
,
action
=
"
store_false
"
,
dest
=
"
online
"
,
help
=
"
list offline repository (filter)
"
)
p_repo
.
add_argument
(
"
-
S
"
,
"
--
no-
state
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
doesn
'
t
display repository state (online/offline)
"
)
p_repo
.
add_argument
(
"
-
v
"
,
"
--
verbose
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
verbose output
"
)
p_repo
.
add_argument
(
"
-
s
"
,
"
--state
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
display repository state (online/offline
/local/remote
)
"
)
p_repo
.
add_argument
(
"
-
u
"
,
"
--
url
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
display repository url
"
)
p_repo
.
add_argument
(
"
repository
"
,
nargs
=
'
*
'
,
default
=
[
"
*
"
],
help
=
"
repository pattern
"
)
p_repo
.
set_defaults
(
func
=
c_repo
)
...
...
This diff is collapsed.
Click to expand it.
completion/bash/is
+
1
−
1
View file @
e3517048
...
...
@@ -139,7 +139,7 @@ _is() {
_filedir -d
;;
repo)
[[ "$cur" == -* ]] && _opt '-h --help
-v --verbose
-l --local -r --remote -o --online -O --offline -
S
--
no-
state --force-offline' && return 0
[[ "$cur" == -* ]] && _opt '-h --help -l --local -r --remote -o --online -O --offline -
s
--state --force-offline
-u --url
' && return 0
_repo
;;
search)
...
...
This diff is collapsed.
Click to expand it.
installsystems/repository.py
+
9
−
4
View file @
e3517048
...
...
@@ -643,11 +643,16 @@ class RepositoryManager(object):
continue
if
not
repo
.
local
and
local
is
True
:
continue
s
=
"
#light##blue#%s#reset#
"
%
repo
.
config
.
name
so
=
"
#l##r#Off#R#
"
if
repo
.
config
.
offline
else
"
#l##g#On#R#
"
sl
=
"
#l##y#Local#R#
"
if
repo
.
local
else
"
#l##c#Remote#R#
"
rc
=
"
#l##r#
"
if
repo
.
config
.
offline
else
"
#l##g#
"
s
=
""
if
state
:
s
+=
"
%s%s
"
%
(
so
,
sl
)
rc
=
"
#l##b#
"
s
+=
"
%s%s#R#
"
%
(
rc
,
repo
.
config
.
name
)
if
url
:
s
+=
"
(%s)
"
%
repo
.
config
.
path
if
state
and
repo
.
config
.
offline
:
s
+=
"
#light##red#[offline]#reset#
"
s
+=
"
(%s)
"
%
repo
.
config
.
path
out
(
s
)
def
show_images
(
self
,
pattern
,
o_json
=
False
,
o_long
=
False
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment