Fossil SCM

Handle the "-u" option on "fossil all sync".

drh 2016-08-19 16:26 trunk
Commit ce910a43c5cf5e4d57e3e57032781b1e612deba2
1 file changed +4 -2
+4 -2
--- src/allrepo.c
+++ src/allrepo.c
@@ -51,12 +51,13 @@
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
*/
5555
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);
56
+ const char *z = find_option(zArg, zShort, 0);
57
+ if( z!=0 ){
58
+ blob_appendf(pExtra, " %s", z);
5859
}
5960
}
6061
static void collect_argument_value(Blob *pExtra, const char *zArg){
6162
const char *zValue = find_option(zArg, 0, 1);
6263
if( zValue ){
@@ -271,10 +272,11 @@
271272
zCmd = "fts-config -R";
272273
collect_argv(&extra, 3);
273274
}else if( strncmp(zCmd, "sync", n)==0 ){
274275
zCmd = "sync -autourl -R";
275276
collect_argument(&extra, "verbose","v");
277
+ collect_argument(&extra, "unversioned","u");
276278
}else if( strncmp(zCmd, "test-integrity", n)==0 ){
277279
collect_argument(&extra, "parse", 0);
278280
zCmd = "test-integrity";
279281
}else if( strncmp(zCmd, "test-orphans", n)==0 ){
280282
zCmd = "test-orphans -R";
281283
--- src/allrepo.c
+++ src/allrepo.c
@@ -51,12 +51,13 @@
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);
62 if( zValue ){
@@ -271,10 +272,11 @@
271 zCmd = "fts-config -R";
272 collect_argv(&extra, 3);
273 }else if( strncmp(zCmd, "sync", n)==0 ){
274 zCmd = "sync -autourl -R";
275 collect_argument(&extra, "verbose","v");
 
276 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
277 collect_argument(&extra, "parse", 0);
278 zCmd = "test-integrity";
279 }else if( strncmp(zCmd, "test-orphans", n)==0 ){
280 zCmd = "test-orphans -R";
281
--- src/allrepo.c
+++ src/allrepo.c
@@ -51,12 +51,13 @@
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 const char *z = find_option(zArg, zShort, 0);
57 if( z!=0 ){
58 blob_appendf(pExtra, " %s", z);
59 }
60 }
61 static void collect_argument_value(Blob *pExtra, const char *zArg){
62 const char *zValue = find_option(zArg, 0, 1);
63 if( zValue ){
@@ -271,10 +272,11 @@
272 zCmd = "fts-config -R";
273 collect_argv(&extra, 3);
274 }else if( strncmp(zCmd, "sync", n)==0 ){
275 zCmd = "sync -autourl -R";
276 collect_argument(&extra, "verbose","v");
277 collect_argument(&extra, "unversioned","u");
278 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
279 collect_argument(&extra, "parse", 0);
280 zCmd = "test-integrity";
281 }else if( strncmp(zCmd, "test-orphans", n)==0 ){
282 zCmd = "test-orphans -R";
283

Keyboard Shortcuts

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