Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Core Modules
dune-common
Commits
71c97aaf
Commit
71c97aaf
authored
17 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
improved "dunecontrol status" output
[[Imported from SVN: r5081]]
parent
c5f816a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/dunecontrol
+44
-12
44 additions, 12 deletions
bin/dunecontrol
with
44 additions
and
12 deletions
bin/dunecontrol
+
44
−
12
View file @
71c97aaf
...
...
@@ -156,30 +156,62 @@ done
run_default_exec
()
{
bash
-c
"eval
$CMD_PARAMS
"
;
}
run_default_status
()
{
local
verbose
=
0
local
update
=
""
for
i
in
$CMD_PARAMS
;
do
if
eval test
"x
$i
"
=
"x-v"
;
then
verbose
=
1
;
fi
if
eval test
"x
$i
"
=
"x-vv"
;
then
verbose
=
2
;
fi
if
eval test
"x
$i
"
=
"x-u"
;
then
update
=
"-u"
;
fi
done
# is out output connected to a tty?
if
test
-t
1
;
then
blue
=
"
\e
[1m
\e
[34m"
green
=
"
\e
[1m
\e
[32m"
red
=
"
\e
[1m
\e
[31m"
reset
=
"
\e
[0m
\e
[37m"
fi
if
eval test
"x
$CMD_PARAMS
"
=
"x-v"
;
then
svn status |
grep
-E
"^M|^A|^D"
elif
eval test
"x
$CMD_PARAMS
"
=
"x-vv"
;
then
svn status
if
test
$verbose
-eq
1
;
then
svn status
$update
|
grep
-E
"^M|^A|^D
|^C|^U
"
elif
test
$verbose
-eq
2
;
then
svn status
$update
fi
count
=
$(
svn status |
grep
-E
"^M|^A|^D"
|
wc
-l
)
name
=
"
$(
eval echo
\$
NAME_
$module
)
"
if
[
$count
=
0
]
;
then
echo
-e
"
$green
[no changes]
$reset
$name
"
elif
[
$count
=
1
]
;
then
echo
-e
"
$blue
[1 change]
$reset
$name
"
changed
=
$(
svn status |
grep
-E
"^M|^A|^D"
|
wc
-l
)
collisions
=
$(
svn status |
grep
-E
"^C"
|
wc
-l
)
pending
=
$(
svn status
$update
|
grep
-E
"^......
\*
"
|
wc
-l
)
color
=
$green
text
=
"no changes"
if
[
$changed
-eq
0
]
;
then
true
elif
[
$changed
-eq
1
]
;
then
color
=
$blue
;
text
=
"1 change"
else
color
=
$blue
;
text
=
"
$changed
changes"
fi
if
[
$pending
-eq
0
]
;
then
true
elif
[
$pending
-eq
1
]
;
then
color
=
$blue
;
text
=
"
$text
, 1 update pending"
else
color
=
$blue
;
text
=
"
$text
,
$pending
updates pending"
fi
if
[
$collisions
-eq
0
]
;
then
true
elif
[
$collisions
-eq
1
]
;
then
color
=
$red
text
=
"
$text
, 1 collision"
else
echo
-e
"
$blue
[
$count
changes]
$reset
$name
"
color
=
$red
text
=
"
$text
,
$count
collisions"
fi
echo
-e
"
$color
[
$text
]
$reset
$name
"
}
run_default_update
()
{
...
...
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