'info' learned not to show ^C column when used with '-p'

This commit is contained in:
Sitaram Chamarty 2012-03-20 07:43:20 +05:30
parent 2e1f840f13
commit 741512482b
3 changed files with 33 additions and 29 deletions

View file

@ -53,12 +53,15 @@ my $lr = lister_dispatch('list-repos');
my $perm;
my $repos;
my @aa;
if ($phy) {
_chdir( $rc{GL_REPO_BASE} );
$repos = list_phy_repos(1);
@aa = qw(R W);
} else {
$repos = $lr->();
@aa = qw(R W ^C);
}
my $creator = '';
@ -66,7 +69,8 @@ for my $repo (@$repos) {
next unless $repo =~ /$patt/;
my $perm = '';
$creator = creator($repo) if $lc;
for my $aa (qw(R W ^C)) {
for my $aa (@aa) {
my $ret = access( $repo, $user, $aa, $ref );
$perm .= ( $ret =~ /DENIED/ ? " " : " $aa" );
}

View file

@ -71,33 +71,33 @@ try "
try "
glt info u1 -p; ok; GS u1
/R W \tt1/
/R \tt2/
/R W \ttesting/
!/R W \tt3/
/R W *\tt1/
/R *\tt2/
/R W *\ttesting/
!/R W *\tt3/
glt info u2 -p; ok; GS u2
/R \tt1/
/R W \tt2/
/R W \ttesting/
!/R W \tt3/
/R *\tt1/
/R W *\tt2/
/R W *\ttesting/
!/R W *\tt3/
glt info u3 -p; ok; GS u3
/R W \tt3/
/R W \ttesting/
!/R \tt1/
!/R W \tt2/
/R W *\tt3/
/R W *\ttesting/
!/R *\tt1/
!/R W *\tt2/
glt info u4 -p; ok; GS u4
/R \tt3/
/R W \ttesting/
!/R \tt1/
!/R W \tt2/
/R *\tt3/
/R W *\ttesting/
!/R *\tt1/
!/R W *\tt2/
glt info u5 -p; ok; GS u5
/R W \ttesting/
!/R \tt1/
!/R W \tt2/
!/R W \tt3/
/R W *\ttesting/
!/R *\tt1/
!/R W *\tt2/
!/R W *\tt3/
glt info u6 -p; ok; GS u6
/R W \ttesting/
!/R \tt1/
!/R W \tt2/
!/R W \tt3/
/R W *\ttesting/
!/R *\tt1/
!/R W *\tt2/
!/R W *\tt3/
";

View file

@ -38,8 +38,8 @@ try "
/WRITERS u2/
# expand
glt info u2 -p
/R W \tfoo/u1/bar/
/R W \ttesting/
/R W *\tfoo/u1/bar/
/R W *\ttesting/
# push
cd ..
@ -81,8 +81,8 @@ try "
/WRITERS u2/
# expand
glt info u2 -p
/R W \tfoo/u1/bar/
/R W \ttesting/
/R W *\tfoo/u1/bar/
/R W *\ttesting/
# push
cd ..