Fossil SCM

improve login-group command documentation and output Prompted by [forum:58f01f6d92], [forum:a7d15cc071], and [forum:1c639bcdea]. Clarify semantics of -R|--repository in 'fossil login-group join' and make user output more helpful. While here, trim some trailing whitespace.

mark 2022-09-28 12:28 trunk
Commit 83bc81e88296200b67f09fce9b71929d3792ed14b3daac0b7bb7191621614573
1 file changed +22 -23
+22 -23
--- src/login.c
+++ src/login.c
@@ -2123,34 +2123,33 @@
21232123
** Usage: %fossil login-group ?SUBCOMMAND? ?OPTIONS?
21242124
**
21252125
** Run various subcommands to manage login-group related settings of the open
21262126
** repository or of the repository identified by the -R or --repository option.
21272127
**
2128
-** > fossil login-group
2129
-**
2130
-** Show the login-group to which the repository belongs.
2131
-**
2132
-** > fossil login-group join REPO ?--name NAME?
2133
-**
2134
-** Add this repository to login group to which REPO belongs, or creates a
2135
-** new login group between itself and REPO if REPO does not already belong
2136
-** to a login-group. When creating a new login-group, the name of the new
2137
-** group is determined by the "--name" option. REPO may optionally be
2138
-** specified using the -R REPO flag.
2139
-**
2140
-** > fossil login-group leave
2141
-**
2142
-** Takes the repository out of whatever login group it is currently
2143
-** a part of.
2144
-**
2145
-** Options valid for all subcommands:
2146
-**
2147
-** -R|--repository REPO Run commands on repository REPO
2128
+** > fossil login-group ?-R REPO?
2129
+**
2130
+** Show the login-group to which REPO, or if invoked from within a checkout
2131
+** the repository on which the current checkout is based, belongs.
2132
+**
2133
+** > fossil login-group join ?-R? REPO ?--name NAME?
2134
+**
2135
+** This subcommand must be invoked from within a checkout to either: add
2136
+** the open repository to the login group that REPO is a member, in which
2137
+** case the optional "--name" argument is not required; or create a new
2138
+** login group between the open repository and REPO, in which case the new
2139
+** group NAME is determined by the mandatory "--name" option. REPO may be
2140
+** specified with or without the -R flag.
2141
+**
2142
+** > fossil login-group leave ?-R REPO?
2143
+**
2144
+** Take the repository REPO, or if invoked from within a checkout the
2145
+** repository on which the current checkout is based, out of whatever
2146
+** login group it is a member.
21482147
**
21492148
** About Login Groups:
2150
-**
2151
-** A login-group is a set of repositories that share user credentials.
2149
+**
2150
+** A login-group is a set of repositories that share user credentials.
21522151
** If a user is logged into one member of the group, then that user can
21532152
** access any other group member as long as they have an entry in the USER
21542153
** table of that member. If a user changes their password using web
21552154
** interface, their password is also automatically changed in every other
21562155
** member of the login group.
@@ -2203,12 +2202,12 @@
22032202
if( zLGName==0 ){
22042203
fossil_print("Not currently a part of any login-group\n");
22052204
return;
22062205
}
22072206
fossil_print("Now part of login-group \"%s\" with:\n", zLGName);
2208
- db_prepare(&q, "SELECT value FROM config WHERE name LIKE 'peer-name-%%'");
2207
+ db_prepare(&q, "SELECT value FROM config WHERE name LIKE 'peer-repo-%%'");
22092208
while( db_step(&q)==SQLITE_ROW ){
22102209
fossil_print(" %s\n", db_column_text(&q,0));
22112210
}
22122211
db_finalize(&q);
22132212
22142213
}
22152214
--- src/login.c
+++ src/login.c
@@ -2123,34 +2123,33 @@
2123 ** Usage: %fossil login-group ?SUBCOMMAND? ?OPTIONS?
2124 **
2125 ** Run various subcommands to manage login-group related settings of the open
2126 ** repository or of the repository identified by the -R or --repository option.
2127 **
2128 ** > fossil login-group
2129 **
2130 ** Show the login-group to which the repository belongs.
2131 **
2132 ** > fossil login-group join REPO ?--name NAME?
2133 **
2134 ** Add this repository to login group to which REPO belongs, or creates a
2135 ** new login group between itself and REPO if REPO does not already belong
2136 ** to a login-group. When creating a new login-group, the name of the new
2137 ** group is determined by the "--name" option. REPO may optionally be
2138 ** specified using the -R REPO flag.
2139 **
2140 ** > fossil login-group leave
2141 **
2142 ** Takes the repository out of whatever login group it is currently
2143 ** a part of.
2144 **
2145 ** Options valid for all subcommands:
2146 **
2147 ** -R|--repository REPO Run commands on repository REPO
2148 **
2149 ** About Login Groups:
2150 **
2151 ** A login-group is a set of repositories that share user credentials.
2152 ** If a user is logged into one member of the group, then that user can
2153 ** access any other group member as long as they have an entry in the USER
2154 ** table of that member. If a user changes their password using web
2155 ** interface, their password is also automatically changed in every other
2156 ** member of the login group.
@@ -2203,12 +2202,12 @@
2203 if( zLGName==0 ){
2204 fossil_print("Not currently a part of any login-group\n");
2205 return;
2206 }
2207 fossil_print("Now part of login-group \"%s\" with:\n", zLGName);
2208 db_prepare(&q, "SELECT value FROM config WHERE name LIKE 'peer-name-%%'");
2209 while( db_step(&q)==SQLITE_ROW ){
2210 fossil_print(" %s\n", db_column_text(&q,0));
2211 }
2212 db_finalize(&q);
2213
2214 }
2215
--- src/login.c
+++ src/login.c
@@ -2123,34 +2123,33 @@
2123 ** Usage: %fossil login-group ?SUBCOMMAND? ?OPTIONS?
2124 **
2125 ** Run various subcommands to manage login-group related settings of the open
2126 ** repository or of the repository identified by the -R or --repository option.
2127 **
2128 ** > fossil login-group ?-R REPO?
2129 **
2130 ** Show the login-group to which REPO, or if invoked from within a checkout
2131 ** the repository on which the current checkout is based, belongs.
2132 **
2133 ** > fossil login-group join ?-R? REPO ?--name NAME?
2134 **
2135 ** This subcommand must be invoked from within a checkout to either: add
2136 ** the open repository to the login group that REPO is a member, in which
2137 ** case the optional "--name" argument is not required; or create a new
2138 ** login group between the open repository and REPO, in which case the new
2139 ** group NAME is determined by the mandatory "--name" option. REPO may be
2140 ** specified with or without the -R flag.
2141 **
2142 ** > fossil login-group leave ?-R REPO?
2143 **
2144 ** Take the repository REPO, or if invoked from within a checkout the
2145 ** repository on which the current checkout is based, out of whatever
2146 ** login group it is a member.
 
2147 **
2148 ** About Login Groups:
2149 **
2150 ** A login-group is a set of repositories that share user credentials.
2151 ** If a user is logged into one member of the group, then that user can
2152 ** access any other group member as long as they have an entry in the USER
2153 ** table of that member. If a user changes their password using web
2154 ** interface, their password is also automatically changed in every other
2155 ** member of the login group.
@@ -2203,12 +2202,12 @@
2202 if( zLGName==0 ){
2203 fossil_print("Not currently a part of any login-group\n");
2204 return;
2205 }
2206 fossil_print("Now part of login-group \"%s\" with:\n", zLGName);
2207 db_prepare(&q, "SELECT value FROM config WHERE name LIKE 'peer-repo-%%'");
2208 while( db_step(&q)==SQLITE_ROW ){
2209 fossil_print(" %s\n", db_column_text(&q,0));
2210 }
2211 db_finalize(&q);
2212
2213 }
2214

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button