Fossil SCM
Show the number of changes following a "fossil update".
Commit
3db1cf69e583250cfbc427097f578c7a1b36421b
Parent
4913964321c48b6…
2 files changed
+12
-2
+12
-2
+12
-2
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -105,10 +105,11 @@ | ||
| 105 | 105 | int nChng; /* Number of file renames */ |
| 106 | 106 | int *aChng; /* Array of file renames */ |
| 107 | 107 | int i; /* Loop counter */ |
| 108 | 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | + int nUpdate = 0; /* Number of chagnes of any kind */ | |
| 110 | 111 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 111 | 112 | |
| 112 | 113 | if( !internalUpdate ){ |
| 113 | 114 | undo_capture_command_line(); |
| 114 | 115 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | ||
| 363 | 364 | char nameChng; /* True if the name changed */ |
| 364 | 365 | |
| 365 | 366 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 366 | 367 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 367 | 368 | nameChng = fossil_strcmp(zName, zNewName); |
| 369 | + nUpdate++; | |
| 368 | 370 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 369 | 371 | /* Conflict. This file has been added to the current checkout |
| 370 | 372 | ** but also exists in the target checkout. Use the current version. |
| 371 | 373 | */ |
| 372 | 374 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | ||
| 446 | 448 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 447 | 449 | blob_reset(&v); |
| 448 | 450 | blob_reset(&t); |
| 449 | 451 | blob_reset(&r); |
| 450 | 452 | }else{ |
| 453 | + nUpdate--; | |
| 451 | 454 | if( chnged ){ |
| 452 | 455 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 453 | 456 | }else{ |
| 454 | 457 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 455 | 458 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | ||
| 461 | 464 | free(zFullPath); |
| 462 | 465 | free(zFullNewPath); |
| 463 | 466 | } |
| 464 | 467 | db_finalize(&q); |
| 465 | 468 | db_finalize(&mtimeXfer); |
| 466 | - fossil_print("--------------\n"); | |
| 467 | - show_common_info(tid, "updated-to:", 1, 0); | |
| 469 | + fossil_print("%.79c\n",'-'); | |
| 470 | + if( nUpdate==0 ){ | |
| 471 | + show_common_info(tid, "checkout:", 1, 0); | |
| 472 | + fossil_print("%-13s None. Already up-to-date\n", "changes:"); | |
| 473 | + }else{ | |
| 474 | + show_common_info(tid, "updated-to:", 1, 0); | |
| 475 | + fossil_print("%-13s %d file%s modified.\n", "changes:", | |
| 476 | + nUpdate, nUpdate>1 ? "s" : ""); | |
| 477 | + } | |
| 468 | 478 | |
| 469 | 479 | /* Report on conflicts |
| 470 | 480 | */ |
| 471 | 481 | if( !nochangeFlag ){ |
| 472 | 482 | Stmt q; |
| 473 | 483 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | int nChng; /* Number of file renames */ |
| 106 | int *aChng; /* Array of file renames */ |
| 107 | int i; /* Loop counter */ |
| 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 111 | |
| 112 | if( !internalUpdate ){ |
| 113 | undo_capture_command_line(); |
| 114 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | |
| 363 | char nameChng; /* True if the name changed */ |
| 364 | |
| 365 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 366 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 367 | nameChng = fossil_strcmp(zName, zNewName); |
| 368 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 369 | /* Conflict. This file has been added to the current checkout |
| 370 | ** but also exists in the target checkout. Use the current version. |
| 371 | */ |
| 372 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | |
| 446 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 447 | blob_reset(&v); |
| 448 | blob_reset(&t); |
| 449 | blob_reset(&r); |
| 450 | }else{ |
| 451 | if( chnged ){ |
| 452 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 453 | }else{ |
| 454 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 455 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | |
| 461 | free(zFullPath); |
| 462 | free(zFullNewPath); |
| 463 | } |
| 464 | db_finalize(&q); |
| 465 | db_finalize(&mtimeXfer); |
| 466 | fossil_print("--------------\n"); |
| 467 | show_common_info(tid, "updated-to:", 1, 0); |
| 468 | |
| 469 | /* Report on conflicts |
| 470 | */ |
| 471 | if( !nochangeFlag ){ |
| 472 | Stmt q; |
| 473 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | int nChng; /* Number of file renames */ |
| 106 | int *aChng; /* Array of file renames */ |
| 107 | int i; /* Loop counter */ |
| 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | int nUpdate = 0; /* Number of chagnes of any kind */ |
| 111 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 112 | |
| 113 | if( !internalUpdate ){ |
| 114 | undo_capture_command_line(); |
| 115 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | |
| 364 | char nameChng; /* True if the name changed */ |
| 365 | |
| 366 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 367 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 368 | nameChng = fossil_strcmp(zName, zNewName); |
| 369 | nUpdate++; |
| 370 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 371 | /* Conflict. This file has been added to the current checkout |
| 372 | ** but also exists in the target checkout. Use the current version. |
| 373 | */ |
| 374 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | |
| 448 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 449 | blob_reset(&v); |
| 450 | blob_reset(&t); |
| 451 | blob_reset(&r); |
| 452 | }else{ |
| 453 | nUpdate--; |
| 454 | if( chnged ){ |
| 455 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 456 | }else{ |
| 457 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 458 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | |
| 464 | free(zFullPath); |
| 465 | free(zFullNewPath); |
| 466 | } |
| 467 | db_finalize(&q); |
| 468 | db_finalize(&mtimeXfer); |
| 469 | fossil_print("%.79c\n",'-'); |
| 470 | if( nUpdate==0 ){ |
| 471 | show_common_info(tid, "checkout:", 1, 0); |
| 472 | fossil_print("%-13s None. Already up-to-date\n", "changes:"); |
| 473 | }else{ |
| 474 | show_common_info(tid, "updated-to:", 1, 0); |
| 475 | fossil_print("%-13s %d file%s modified.\n", "changes:", |
| 476 | nUpdate, nUpdate>1 ? "s" : ""); |
| 477 | } |
| 478 | |
| 479 | /* Report on conflicts |
| 480 | */ |
| 481 | if( !nochangeFlag ){ |
| 482 | Stmt q; |
| 483 |
+12
-2
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -105,10 +105,11 @@ | ||
| 105 | 105 | int nChng; /* Number of file renames */ |
| 106 | 106 | int *aChng; /* Array of file renames */ |
| 107 | 107 | int i; /* Loop counter */ |
| 108 | 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | + int nUpdate = 0; /* Number of chagnes of any kind */ | |
| 110 | 111 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 111 | 112 | |
| 112 | 113 | if( !internalUpdate ){ |
| 113 | 114 | undo_capture_command_line(); |
| 114 | 115 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | ||
| 363 | 364 | char nameChng; /* True if the name changed */ |
| 364 | 365 | |
| 365 | 366 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 366 | 367 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 367 | 368 | nameChng = fossil_strcmp(zName, zNewName); |
| 369 | + nUpdate++; | |
| 368 | 370 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 369 | 371 | /* Conflict. This file has been added to the current checkout |
| 370 | 372 | ** but also exists in the target checkout. Use the current version. |
| 371 | 373 | */ |
| 372 | 374 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | ||
| 446 | 448 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 447 | 449 | blob_reset(&v); |
| 448 | 450 | blob_reset(&t); |
| 449 | 451 | blob_reset(&r); |
| 450 | 452 | }else{ |
| 453 | + nUpdate--; | |
| 451 | 454 | if( chnged ){ |
| 452 | 455 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 453 | 456 | }else{ |
| 454 | 457 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 455 | 458 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | ||
| 461 | 464 | free(zFullPath); |
| 462 | 465 | free(zFullNewPath); |
| 463 | 466 | } |
| 464 | 467 | db_finalize(&q); |
| 465 | 468 | db_finalize(&mtimeXfer); |
| 466 | - fossil_print("--------------\n"); | |
| 467 | - show_common_info(tid, "updated-to:", 1, 0); | |
| 469 | + fossil_print("%.79c\n",'-'); | |
| 470 | + if( nUpdate==0 ){ | |
| 471 | + show_common_info(tid, "checkout:", 1, 0); | |
| 472 | + fossil_print("%-13s None. Already up-to-date\n", "changes:"); | |
| 473 | + }else{ | |
| 474 | + show_common_info(tid, "updated-to:", 1, 0); | |
| 475 | + fossil_print("%-13s %d file%s modified.\n", "changes:", | |
| 476 | + nUpdate, nUpdate>1 ? "s" : ""); | |
| 477 | + } | |
| 468 | 478 | |
| 469 | 479 | /* Report on conflicts |
| 470 | 480 | */ |
| 471 | 481 | if( !nochangeFlag ){ |
| 472 | 482 | Stmt q; |
| 473 | 483 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | int nChng; /* Number of file renames */ |
| 106 | int *aChng; /* Array of file renames */ |
| 107 | int i; /* Loop counter */ |
| 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 111 | |
| 112 | if( !internalUpdate ){ |
| 113 | undo_capture_command_line(); |
| 114 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | |
| 363 | char nameChng; /* True if the name changed */ |
| 364 | |
| 365 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 366 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 367 | nameChng = fossil_strcmp(zName, zNewName); |
| 368 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 369 | /* Conflict. This file has been added to the current checkout |
| 370 | ** but also exists in the target checkout. Use the current version. |
| 371 | */ |
| 372 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | |
| 446 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 447 | blob_reset(&v); |
| 448 | blob_reset(&t); |
| 449 | blob_reset(&r); |
| 450 | }else{ |
| 451 | if( chnged ){ |
| 452 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 453 | }else{ |
| 454 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 455 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | |
| 461 | free(zFullPath); |
| 462 | free(zFullNewPath); |
| 463 | } |
| 464 | db_finalize(&q); |
| 465 | db_finalize(&mtimeXfer); |
| 466 | fossil_print("--------------\n"); |
| 467 | show_common_info(tid, "updated-to:", 1, 0); |
| 468 | |
| 469 | /* Report on conflicts |
| 470 | */ |
| 471 | if( !nochangeFlag ){ |
| 472 | Stmt q; |
| 473 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | int nChng; /* Number of file renames */ |
| 106 | int *aChng; /* Array of file renames */ |
| 107 | int i; /* Loop counter */ |
| 108 | int nConflict = 0; /* Number of merge conflicts */ |
| 109 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 110 | int nUpdate = 0; /* Number of chagnes of any kind */ |
| 111 | Stmt mtimeXfer; /* Statment to transfer mtimes */ |
| 112 | |
| 113 | if( !internalUpdate ){ |
| 114 | undo_capture_command_line(); |
| 115 | url_proxy_options(); |
| @@ -363,10 +364,11 @@ | |
| 364 | char nameChng; /* True if the name changed */ |
| 365 | |
| 366 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| 367 | zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName); |
| 368 | nameChng = fossil_strcmp(zName, zNewName); |
| 369 | nUpdate++; |
| 370 | if( idv>0 && ridv==0 && idt>0 && ridt>0 ){ |
| 371 | /* Conflict. This file has been added to the current checkout |
| 372 | ** but also exists in the target checkout. Use the current version. |
| 373 | */ |
| 374 | fossil_print("CONFLICT %s\n", zName); |
| @@ -446,10 +448,11 @@ | |
| 448 | if( nameChng && !nochangeFlag ) file_delete(zFullPath); |
| 449 | blob_reset(&v); |
| 450 | blob_reset(&t); |
| 451 | blob_reset(&r); |
| 452 | }else{ |
| 453 | nUpdate--; |
| 454 | if( chnged ){ |
| 455 | if( verboseFlag ) fossil_print("EDITED %s\n", zName); |
| 456 | }else{ |
| 457 | db_bind_int(&mtimeXfer, ":idv", idv); |
| 458 | db_bind_int(&mtimeXfer, ":idt", idt); |
| @@ -461,12 +464,19 @@ | |
| 464 | free(zFullPath); |
| 465 | free(zFullNewPath); |
| 466 | } |
| 467 | db_finalize(&q); |
| 468 | db_finalize(&mtimeXfer); |
| 469 | fossil_print("%.79c\n",'-'); |
| 470 | if( nUpdate==0 ){ |
| 471 | show_common_info(tid, "checkout:", 1, 0); |
| 472 | fossil_print("%-13s None. Already up-to-date\n", "changes:"); |
| 473 | }else{ |
| 474 | show_common_info(tid, "updated-to:", 1, 0); |
| 475 | fossil_print("%-13s %d file%s modified.\n", "changes:", |
| 476 | nUpdate, nUpdate>1 ? "s" : ""); |
| 477 | } |
| 478 | |
| 479 | /* Report on conflicts |
| 480 | */ |
| 481 | if( !nochangeFlag ){ |
| 482 | Stmt q; |
| 483 |