Fossil SCM

For the "fossil info" command from without an open check-out, only show the alt-root and access-url information if the --detail or -l options are given.

drh 2012-04-28 17:28 trunk
Commit f1487280a8752504ccd31c0e1a7dd4ce14046581
1 file changed +3 -1
+3 -1
--- src/info.c
+++ src/info.c
@@ -171,15 +171,17 @@
171171
** file in a checkout.
172172
**
173173
** Options:
174174
**
175175
** -R|--repository FILE Extract info from repository FILE
176
+** -l|--detail Show extra information
176177
**
177178
** See also: annotate, artifact, finfo, timeline
178179
*/
179180
void info_cmd(void){
180181
i64 fsize;
182
+ int bDetail = find_option("detail","l",0)!=0;
181183
if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
182184
db_open_config(0);
183185
db_record_repository_filename(g.argv[2]);
184186
db_open_repository(g.argv[2]);
185187
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -195,11 +197,11 @@
195197
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
196198
if( g.localOpen ){
197199
fossil_print("repository: %s\n", db_repository_filename());
198200
fossil_print("local-root: %s\n", g.zLocalRoot);
199201
}
200
- extraRepoInfo();
202
+ if( bDetail ) extraRepoInfo();
201203
#if defined(_WIN32)
202204
if( g.zHome ){
203205
fossil_print("user-home: %s\n", g.zHome);
204206
}
205207
#endif
206208
--- src/info.c
+++ src/info.c
@@ -171,15 +171,17 @@
171 ** file in a checkout.
172 **
173 ** Options:
174 **
175 ** -R|--repository FILE Extract info from repository FILE
 
176 **
177 ** See also: annotate, artifact, finfo, timeline
178 */
179 void info_cmd(void){
180 i64 fsize;
 
181 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
182 db_open_config(0);
183 db_record_repository_filename(g.argv[2]);
184 db_open_repository(g.argv[2]);
185 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -195,11 +197,11 @@
195 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
196 if( g.localOpen ){
197 fossil_print("repository: %s\n", db_repository_filename());
198 fossil_print("local-root: %s\n", g.zLocalRoot);
199 }
200 extraRepoInfo();
201 #if defined(_WIN32)
202 if( g.zHome ){
203 fossil_print("user-home: %s\n", g.zHome);
204 }
205 #endif
206
--- src/info.c
+++ src/info.c
@@ -171,15 +171,17 @@
171 ** file in a checkout.
172 **
173 ** Options:
174 **
175 ** -R|--repository FILE Extract info from repository FILE
176 ** -l|--detail Show extra information
177 **
178 ** See also: annotate, artifact, finfo, timeline
179 */
180 void info_cmd(void){
181 i64 fsize;
182 int bDetail = find_option("detail","l",0)!=0;
183 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
184 db_open_config(0);
185 db_record_repository_filename(g.argv[2]);
186 db_open_repository(g.argv[2]);
187 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -195,11 +197,11 @@
197 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
198 if( g.localOpen ){
199 fossil_print("repository: %s\n", db_repository_filename());
200 fossil_print("local-root: %s\n", g.zLocalRoot);
201 }
202 if( bDetail ) extraRepoInfo();
203 #if defined(_WIN32)
204 if( g.zHome ){
205 fossil_print("user-home: %s\n", g.zHome);
206 }
207 #endif
208

Keyboard Shortcuts

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