'info' learned not to show ^C column when used with '-p'
This commit is contained in:
parent
2e1f840f13
commit
741512482b
|
@ -53,12 +53,15 @@ my $lr = lister_dispatch('list-repos');
|
||||||
|
|
||||||
my $perm;
|
my $perm;
|
||||||
my $repos;
|
my $repos;
|
||||||
|
my @aa;
|
||||||
|
|
||||||
if ($phy) {
|
if ($phy) {
|
||||||
_chdir( $rc{GL_REPO_BASE} );
|
_chdir( $rc{GL_REPO_BASE} );
|
||||||
$repos = list_phy_repos(1);
|
$repos = list_phy_repos(1);
|
||||||
|
@aa = qw(R W);
|
||||||
} else {
|
} else {
|
||||||
$repos = $lr->();
|
$repos = $lr->();
|
||||||
|
@aa = qw(R W ^C);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $creator = '';
|
my $creator = '';
|
||||||
|
@ -66,7 +69,8 @@ for my $repo (@$repos) {
|
||||||
next unless $repo =~ /$patt/;
|
next unless $repo =~ /$patt/;
|
||||||
my $perm = '';
|
my $perm = '';
|
||||||
$creator = creator($repo) if $lc;
|
$creator = creator($repo) if $lc;
|
||||||
for my $aa (qw(R W ^C)) {
|
|
||||||
|
for my $aa (@aa) {
|
||||||
my $ret = access( $repo, $user, $aa, $ref );
|
my $ret = access( $repo, $user, $aa, $ref );
|
||||||
$perm .= ( $ret =~ /DENIED/ ? " " : " $aa" );
|
$perm .= ( $ret =~ /DENIED/ ? " " : " $aa" );
|
||||||
}
|
}
|
||||||
|
|
48
t/info.t
48
t/info.t
|
@ -71,33 +71,33 @@ try "
|
||||||
|
|
||||||
try "
|
try "
|
||||||
glt info u1 -p; ok; GS u1
|
glt info u1 -p; ok; GS u1
|
||||||
/R W \tt1/
|
/R W *\tt1/
|
||||||
/R \tt2/
|
/R *\tt2/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R W \tt3/
|
!/R W *\tt3/
|
||||||
glt info u2 -p; ok; GS u2
|
glt info u2 -p; ok; GS u2
|
||||||
/R \tt1/
|
/R *\tt1/
|
||||||
/R W \tt2/
|
/R W *\tt2/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R W \tt3/
|
!/R W *\tt3/
|
||||||
glt info u3 -p; ok; GS u3
|
glt info u3 -p; ok; GS u3
|
||||||
/R W \tt3/
|
/R W *\tt3/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R \tt1/
|
!/R *\tt1/
|
||||||
!/R W \tt2/
|
!/R W *\tt2/
|
||||||
glt info u4 -p; ok; GS u4
|
glt info u4 -p; ok; GS u4
|
||||||
/R \tt3/
|
/R *\tt3/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R \tt1/
|
!/R *\tt1/
|
||||||
!/R W \tt2/
|
!/R W *\tt2/
|
||||||
glt info u5 -p; ok; GS u5
|
glt info u5 -p; ok; GS u5
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R \tt1/
|
!/R *\tt1/
|
||||||
!/R W \tt2/
|
!/R W *\tt2/
|
||||||
!/R W \tt3/
|
!/R W *\tt3/
|
||||||
glt info u6 -p; ok; GS u6
|
glt info u6 -p; ok; GS u6
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
!/R \tt1/
|
!/R *\tt1/
|
||||||
!/R W \tt2/
|
!/R W *\tt2/
|
||||||
!/R W \tt3/
|
!/R W *\tt3/
|
||||||
";
|
";
|
||||||
|
|
|
@ -38,8 +38,8 @@ try "
|
||||||
/WRITERS u2/
|
/WRITERS u2/
|
||||||
# expand
|
# expand
|
||||||
glt info u2 -p
|
glt info u2 -p
|
||||||
/R W \tfoo/u1/bar/
|
/R W *\tfoo/u1/bar/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
|
|
||||||
# push
|
# push
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -81,8 +81,8 @@ try "
|
||||||
/WRITERS u2/
|
/WRITERS u2/
|
||||||
# expand
|
# expand
|
||||||
glt info u2 -p
|
glt info u2 -p
|
||||||
/R W \tfoo/u1/bar/
|
/R W *\tfoo/u1/bar/
|
||||||
/R W \ttesting/
|
/R W *\ttesting/
|
||||||
|
|
||||||
# push
|
# push
|
||||||
cd ..
|
cd ..
|
||||||
|
|
Loading…
Reference in a new issue