Fossil SCM

Allow "fossil all ... -v" as alternative to "fossil all ... --verbose"

jan.nijtmans 2013-05-15 08:54 trunk
Commit 6d09745a6ff9eae88a2dd2e937de911438306b98
1 file changed +15 -15
+15 -15
--- src/allrepo.c
+++ src/allrepo.c
@@ -50,12 +50,12 @@
5050
/*
5151
** Build a string that contains all of the command-line options
5252
** specified as arguments. If the option name begins with "+" then
5353
** it takes an argument. Without the "+" it does not.
5454
*/
55
-static void collect_argument(Blob *pExtra, const char *zArg){
56
- if( find_option(zArg, 0, 0)!=0 ){
55
+static void collect_argument(Blob *pExtra, const char *zArg, const char *zShort){
56
+ if( find_option(zArg, zShort, 0)!=0 ){
5757
blob_appendf(pExtra, " --%s", zArg);
5858
}
5959
}
6060
static void collect_argument_value(Blob *pExtra, const char *zArg){
6161
const char *zValue = find_option(zArg, 0, 1);
@@ -122,11 +122,11 @@
122122
if( !dryRunFlag ){
123123
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
124124
}
125125
126126
if( g.argc<3 ){
127
- usage("changes|list|ls|pull|push|rebuild|sync");
127
+ usage("changes|ignore|list|ls|pull|push|rebuild|sync");
128128
}
129129
n = strlen(g.argv[2]);
130130
db_open_config(1);
131131
blob_zero(&extra);
132132
zCmd = g.argv[2];
@@ -133,35 +133,35 @@
133133
if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
134134
zCmd = "list";
135135
useCheckouts = find_option("ckout","c",0)!=0;
136136
}else if( strncmp(zCmd, "push", n)==0 ){
137137
zCmd = "push -autourl -R";
138
- collect_argument(&extra, "verbose");
138
+ collect_argument(&extra, "verbose","v");
139139
}else if( strncmp(zCmd, "pull", n)==0 ){
140140
zCmd = "pull -autourl -R";
141
- collect_argument(&extra, "verbose");
141
+ collect_argument(&extra, "verbose","v");
142142
}else if( strncmp(zCmd, "rebuild", n)==0 ){
143143
zCmd = "rebuild";
144
- collect_argument(&extra, "cluster");
145
- collect_argument(&extra, "compress");
146
- collect_argument(&extra, "noverify");
144
+ collect_argument(&extra, "cluster",0);
145
+ collect_argument(&extra, "compress",0);
146
+ collect_argument(&extra, "noverify",0);
147147
collect_argument_value(&extra, "pagesize");
148
- collect_argument(&extra, "vacuum");
149
- collect_argument(&extra, "deanalyze");
150
- collect_argument(&extra, "analyze");
151
- collect_argument(&extra, "wal");
152
- collect_argument(&extra, "stat");
148
+ collect_argument(&extra, "vacuum",0);
149
+ collect_argument(&extra, "deanalyze",0);
150
+ collect_argument(&extra, "analyze",0);
151
+ collect_argument(&extra, "wal",0);
152
+ collect_argument(&extra, "stats",0);
153153
}else if( strncmp(zCmd, "sync", n)==0 ){
154154
zCmd = "sync -autourl -R";
155
- collect_argument(&extra, "verbose");
155
+ collect_argument(&extra, "verbose","v");
156156
}else if( strncmp(zCmd, "test-integrity", n)==0 ){
157157
zCmd = "test-integrity";
158158
}else if( strncmp(zCmd, "test-orphans", n)==0 ){
159159
zCmd = "test-orphans -R";
160160
}else if( strncmp(zCmd, "test-missing", n)==0 ){
161161
zCmd = "test-missing -q -R";
162
- collect_argument(&extra, "notshunned");
162
+ collect_argument(&extra, "notshunned",0);
163163
}else if( strncmp(zCmd, "changes", n)==0 ){
164164
zCmd = "changes --quiet --header --chdir";
165165
useCheckouts = 1;
166166
stopOnError = 0;
167167
quiet = 1;
168168
--- src/allrepo.c
+++ src/allrepo.c
@@ -50,12 +50,12 @@
50 /*
51 ** Build a string that contains all of the command-line options
52 ** specified as arguments. If the option name begins with "+" then
53 ** it takes an argument. Without the "+" it does not.
54 */
55 static void collect_argument(Blob *pExtra, const char *zArg){
56 if( find_option(zArg, 0, 0)!=0 ){
57 blob_appendf(pExtra, " --%s", zArg);
58 }
59 }
60 static void collect_argument_value(Blob *pExtra, const char *zArg){
61 const char *zValue = find_option(zArg, 0, 1);
@@ -122,11 +122,11 @@
122 if( !dryRunFlag ){
123 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
124 }
125
126 if( g.argc<3 ){
127 usage("changes|list|ls|pull|push|rebuild|sync");
128 }
129 n = strlen(g.argv[2]);
130 db_open_config(1);
131 blob_zero(&extra);
132 zCmd = g.argv[2];
@@ -133,35 +133,35 @@
133 if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
134 zCmd = "list";
135 useCheckouts = find_option("ckout","c",0)!=0;
136 }else if( strncmp(zCmd, "push", n)==0 ){
137 zCmd = "push -autourl -R";
138 collect_argument(&extra, "verbose");
139 }else if( strncmp(zCmd, "pull", n)==0 ){
140 zCmd = "pull -autourl -R";
141 collect_argument(&extra, "verbose");
142 }else if( strncmp(zCmd, "rebuild", n)==0 ){
143 zCmd = "rebuild";
144 collect_argument(&extra, "cluster");
145 collect_argument(&extra, "compress");
146 collect_argument(&extra, "noverify");
147 collect_argument_value(&extra, "pagesize");
148 collect_argument(&extra, "vacuum");
149 collect_argument(&extra, "deanalyze");
150 collect_argument(&extra, "analyze");
151 collect_argument(&extra, "wal");
152 collect_argument(&extra, "stat");
153 }else if( strncmp(zCmd, "sync", n)==0 ){
154 zCmd = "sync -autourl -R";
155 collect_argument(&extra, "verbose");
156 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
157 zCmd = "test-integrity";
158 }else if( strncmp(zCmd, "test-orphans", n)==0 ){
159 zCmd = "test-orphans -R";
160 }else if( strncmp(zCmd, "test-missing", n)==0 ){
161 zCmd = "test-missing -q -R";
162 collect_argument(&extra, "notshunned");
163 }else if( strncmp(zCmd, "changes", n)==0 ){
164 zCmd = "changes --quiet --header --chdir";
165 useCheckouts = 1;
166 stopOnError = 0;
167 quiet = 1;
168
--- src/allrepo.c
+++ src/allrepo.c
@@ -50,12 +50,12 @@
50 /*
51 ** Build a string that contains all of the command-line options
52 ** specified as arguments. If the option name begins with "+" then
53 ** it takes an argument. Without the "+" it does not.
54 */
55 static void collect_argument(Blob *pExtra, const char *zArg, const char *zShort){
56 if( find_option(zArg, zShort, 0)!=0 ){
57 blob_appendf(pExtra, " --%s", zArg);
58 }
59 }
60 static void collect_argument_value(Blob *pExtra, const char *zArg){
61 const char *zValue = find_option(zArg, 0, 1);
@@ -122,11 +122,11 @@
122 if( !dryRunFlag ){
123 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
124 }
125
126 if( g.argc<3 ){
127 usage("changes|ignore|list|ls|pull|push|rebuild|sync");
128 }
129 n = strlen(g.argv[2]);
130 db_open_config(1);
131 blob_zero(&extra);
132 zCmd = g.argv[2];
@@ -133,35 +133,35 @@
133 if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
134 zCmd = "list";
135 useCheckouts = find_option("ckout","c",0)!=0;
136 }else if( strncmp(zCmd, "push", n)==0 ){
137 zCmd = "push -autourl -R";
138 collect_argument(&extra, "verbose","v");
139 }else if( strncmp(zCmd, "pull", n)==0 ){
140 zCmd = "pull -autourl -R";
141 collect_argument(&extra, "verbose","v");
142 }else if( strncmp(zCmd, "rebuild", n)==0 ){
143 zCmd = "rebuild";
144 collect_argument(&extra, "cluster",0);
145 collect_argument(&extra, "compress",0);
146 collect_argument(&extra, "noverify",0);
147 collect_argument_value(&extra, "pagesize");
148 collect_argument(&extra, "vacuum",0);
149 collect_argument(&extra, "deanalyze",0);
150 collect_argument(&extra, "analyze",0);
151 collect_argument(&extra, "wal",0);
152 collect_argument(&extra, "stats",0);
153 }else if( strncmp(zCmd, "sync", n)==0 ){
154 zCmd = "sync -autourl -R";
155 collect_argument(&extra, "verbose","v");
156 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
157 zCmd = "test-integrity";
158 }else if( strncmp(zCmd, "test-orphans", n)==0 ){
159 zCmd = "test-orphans -R";
160 }else if( strncmp(zCmd, "test-missing", n)==0 ){
161 zCmd = "test-missing -q -R";
162 collect_argument(&extra, "notshunned",0);
163 }else if( strncmp(zCmd, "changes", n)==0 ){
164 zCmd = "changes --quiet --header --chdir";
165 useCheckouts = 1;
166 stopOnError = 0;
167 quiet = 1;
168

Keyboard Shortcuts

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