Fossil SCM

Combine "fossil forks" with "fossil info" command

jan.nijtmans 2015-04-26 17:12 trunk
Commit 4359bd8df2119799ce2380ba84775b1b9731c225
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -2118,8 +2118,8 @@
21182118
21192119
if( !g.markPrivate ){
21202120
autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1));
21212121
}
21222122
if( count_nonbranch_children(vid)>1 ){
2123
- fossil_print("**** warning: a fork has occurred *****\n");
2123
+ fossil_print("**** warning: an ambigeous branch has occurred *****\n");
21242124
}
21252125
}
21262126
--- src/checkin.c
+++ src/checkin.c
@@ -2118,8 +2118,8 @@
2118
2119 if( !g.markPrivate ){
2120 autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1));
2121 }
2122 if( count_nonbranch_children(vid)>1 ){
2123 fossil_print("**** warning: a fork has occurred *****\n");
2124 }
2125 }
2126
--- src/checkin.c
+++ src/checkin.c
@@ -2118,8 +2118,8 @@
2118
2119 if( !g.markPrivate ){
2120 autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1));
2121 }
2122 if( count_nonbranch_children(vid)>1 ){
2123 fossil_print("**** warning: an ambigeous branch has occurred *****\n");
2124 }
2125 }
2126
--- src/descendants.c
+++ src/descendants.c
@@ -340,15 +340,14 @@
340340
db_finalize(&q);
341341
}
342342
343343
/*
344344
** COMMAND: leaves*
345
-** COMMAND: forks*
345
+**
346
+** Usage: %fossil leaves ?OPTIONS?
346347
**
347
-** Usage: %fossil leaves|forks ?OPTIONS?
348
-**
349
-** Find leaves/forks of all branches. By default show only open leaves.
348
+** Find leaves of all branches. By default show only open leaves.
350349
** The -a|--all flag causes all leaves (closed and open) to be shown.
351350
** The -c|--closed flag shows only closed leaves.
352351
**
353352
** The --recompute flag causes the content of the "leaf" table in the
354353
** repository database to be recomputed.
@@ -368,12 +367,12 @@
368367
Stmt q;
369368
Blob sql;
370369
int showAll = find_option("all", "a", 0)!=0;
371370
int showClosed = find_option("closed", "c", 0)!=0;
372371
int recomputeFlag = find_option("recompute",0,0)!=0;
373
- int byBranch = find_option("bybranch",0,0)!=0;
374
- int showForks = g.argv[1][0]=='f';
372
+ int showForks = g.argv[1][0]!='l';
373
+ int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
375374
const char *zWidth = find_option("width","W",1);
376375
char *zLastBr = 0;
377376
int n, width;
378377
char zLineNo[10];
379378
@@ -430,10 +429,11 @@
430429
fossil_free(z);
431430
}
432431
}
433432
fossil_free(zLastBr);
434433
db_finalize(&q);
434
+ if( showForks && !zLastBr ) fossil_print("*** OK, no ambigeous branches found ***\n");
435435
}
436436
437437
/*
438438
** WEBPAGE: leaves
439439
**
440440
--- src/descendants.c
+++ src/descendants.c
@@ -340,15 +340,14 @@
340 db_finalize(&q);
341 }
342
343 /*
344 ** COMMAND: leaves*
345 ** COMMAND: forks*
 
346 **
347 ** Usage: %fossil leaves|forks ?OPTIONS?
348 **
349 ** Find leaves/forks of all branches. By default show only open leaves.
350 ** The -a|--all flag causes all leaves (closed and open) to be shown.
351 ** The -c|--closed flag shows only closed leaves.
352 **
353 ** The --recompute flag causes the content of the "leaf" table in the
354 ** repository database to be recomputed.
@@ -368,12 +367,12 @@
368 Stmt q;
369 Blob sql;
370 int showAll = find_option("all", "a", 0)!=0;
371 int showClosed = find_option("closed", "c", 0)!=0;
372 int recomputeFlag = find_option("recompute",0,0)!=0;
373 int byBranch = find_option("bybranch",0,0)!=0;
374 int showForks = g.argv[1][0]=='f';
375 const char *zWidth = find_option("width","W",1);
376 char *zLastBr = 0;
377 int n, width;
378 char zLineNo[10];
379
@@ -430,10 +429,11 @@
430 fossil_free(z);
431 }
432 }
433 fossil_free(zLastBr);
434 db_finalize(&q);
 
435 }
436
437 /*
438 ** WEBPAGE: leaves
439 **
440
--- src/descendants.c
+++ src/descendants.c
@@ -340,15 +340,14 @@
340 db_finalize(&q);
341 }
342
343 /*
344 ** COMMAND: leaves*
345 **
346 ** Usage: %fossil leaves ?OPTIONS?
347 **
348 ** Find leaves of all branches. By default show only open leaves.
 
 
349 ** The -a|--all flag causes all leaves (closed and open) to be shown.
350 ** The -c|--closed flag shows only closed leaves.
351 **
352 ** The --recompute flag causes the content of the "leaf" table in the
353 ** repository database to be recomputed.
@@ -368,12 +367,12 @@
367 Stmt q;
368 Blob sql;
369 int showAll = find_option("all", "a", 0)!=0;
370 int showClosed = find_option("closed", "c", 0)!=0;
371 int recomputeFlag = find_option("recompute",0,0)!=0;
372 int showForks = g.argv[1][0]!='l';
373 int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
374 const char *zWidth = find_option("width","W",1);
375 char *zLastBr = 0;
376 int n, width;
377 char zLineNo[10];
378
@@ -430,10 +429,11 @@
429 fossil_free(z);
430 }
431 }
432 fossil_free(zLastBr);
433 db_finalize(&q);
434 if( showForks && !zLastBr ) fossil_print("*** OK, no ambigeous branches found ***\n");
435 }
436
437 /*
438 ** WEBPAGE: leaves
439 **
440
+2
--- src/info.c
+++ src/info.c
@@ -244,10 +244,12 @@
244244
if( rid==0 ){
245245
fossil_fatal("no such object: %s\n", g.argv[2]);
246246
}
247247
show_common_info(rid, "uuid:", 1, 1);
248248
}
249
+ fossil_print("ambigeous branches:\n");
250
+ leaves_cmd();
249251
}
250252
251253
/*
252254
** Show information about all tags on a given check-in.
253255
*/
254256
--- src/info.c
+++ src/info.c
@@ -244,10 +244,12 @@
244 if( rid==0 ){
245 fossil_fatal("no such object: %s\n", g.argv[2]);
246 }
247 show_common_info(rid, "uuid:", 1, 1);
248 }
 
 
249 }
250
251 /*
252 ** Show information about all tags on a given check-in.
253 */
254
--- src/info.c
+++ src/info.c
@@ -244,10 +244,12 @@
244 if( rid==0 ){
245 fossil_fatal("no such object: %s\n", g.argv[2]);
246 }
247 show_common_info(rid, "uuid:", 1, 1);
248 }
249 fossil_print("ambigeous branches:\n");
250 leaves_cmd();
251 }
252
253 /*
254 ** Show information about all tags on a given check-in.
255 */
256
+2 -2
--- src/xfer.c
+++ src/xfer.c
@@ -1973,10 +1973,10 @@
19731973
manifest_crosslink_end(MC_PERMIT_HOOKS);
19741974
content_enable_dephantomize(1);
19751975
db_end_transaction(0);
19761976
}
19771977
if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978
- fossil_warning("***** WARNING: a fork has occurred ***** use "
1979
- "\"fossil forks\" for more details.");
1978
+ fossil_warning("***** WARNING: an ambigeous branch has occurred *****\n"
1979
+ "Use \"fossil info\" for more details.");
19801980
}
19811981
return nErr;
19821982
}
19831983
--- src/xfer.c
+++ src/xfer.c
@@ -1973,10 +1973,10 @@
1973 manifest_crosslink_end(MC_PERMIT_HOOKS);
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: a fork has occurred ***** use "
1979 "\"fossil forks\" for more details.");
1980 }
1981 return nErr;
1982 }
1983
--- src/xfer.c
+++ src/xfer.c
@@ -1973,10 +1973,10 @@
1973 manifest_crosslink_end(MC_PERMIT_HOOKS);
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: an ambigeous branch has occurred *****\n"
1979 "Use \"fossil info\" for more details.");
1980 }
1981 return nErr;
1982 }
1983

Keyboard Shortcuts

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