Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Show the number of changes following a "fossil update". |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
3db1cf69e583250cfbc427097f578c7a |
| User & Date: | drh 2012-09-06 10:23:02.919 |
Context
|
2012-09-06
| ||
| 13:52 | Improvements to the "root:TAG" naming option so that TAG can also be a UUID. check-in: 0e9277267f user: drh tags: trunk | |
| 10:23 | Show the number of changes following a "fossil update". check-in: 3db1cf69e5 user: drh tags: trunk | |
|
2012-09-05
| ||
| 20:54 | Do not count divider lines as "items" on the timeline. check-in: 4913964321 user: drh tags: trunk | |
|
2012-02-09
| ||
| 13:55 | Experimental changes to the "update" command to have it report when it makes no changes to the repository. Closed-Leaf check-in: be10939bff user: drh tags: experimental | |
Changes
Changes to src/update.c.
| ︙ | ︙ | |||
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
int verboseFlag; /* -v or --verbose. Output extra information */
int debugFlag; /* --debug option */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
int nOverwrite = 0; /* Number of unmanaged files overwritten */
Stmt mtimeXfer; /* Statment to transfer mtimes */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
}
latestFlag = find_option("latest",0, 0)!=0;
| > | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
int verboseFlag; /* -v or --verbose. Output extra information */
int debugFlag; /* --debug option */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
int nOverwrite = 0; /* Number of unmanaged files overwritten */
int nUpdate = 0; /* Number of chagnes of any kind */
Stmt mtimeXfer; /* Statment to transfer mtimes */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
}
latestFlag = find_option("latest",0, 0)!=0;
|
| ︙ | ︙ | |||
361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
char *zFullPath; /* Full pathname of the file */
char *zFullNewPath; /* Full pathname of dest */
char nameChng; /* True if the name changed */
zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName);
nameChng = fossil_strcmp(zName, zNewName);
if( idv>0 && ridv==0 && idt>0 && ridt>0 ){
/* Conflict. This file has been added to the current checkout
** but also exists in the target checkout. Use the current version.
*/
fossil_print("CONFLICT %s\n", zName);
nConflict++;
}else if( idt>0 && idv==0 ){
| > | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
char *zFullPath; /* Full pathname of the file */
char *zFullNewPath; /* Full pathname of dest */
char nameChng; /* True if the name changed */
zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName);
nameChng = fossil_strcmp(zName, zNewName);
nUpdate++;
if( idv>0 && ridv==0 && idt>0 && ridt>0 ){
/* Conflict. This file has been added to the current checkout
** but also exists in the target checkout. Use the current version.
*/
fossil_print("CONFLICT %s\n", zName);
nConflict++;
}else if( idt>0 && idv==0 ){
|
| ︙ | ︙ | |||
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
}
}
if( nameChng && !nochangeFlag ) file_delete(zFullPath);
blob_reset(&v);
blob_reset(&t);
blob_reset(&r);
}else{
if( chnged ){
if( verboseFlag ) fossil_print("EDITED %s\n", zName);
}else{
db_bind_int(&mtimeXfer, ":idv", idv);
db_bind_int(&mtimeXfer, ":idt", idt);
db_step(&mtimeXfer);
db_reset(&mtimeXfer);
if( verboseFlag ) fossil_print("UNCHANGED %s\n", zName);
}
}
free(zFullPath);
free(zFullNewPath);
}
db_finalize(&q);
db_finalize(&mtimeXfer);
| > | > > > > | > > > | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
}
}
if( nameChng && !nochangeFlag ) file_delete(zFullPath);
blob_reset(&v);
blob_reset(&t);
blob_reset(&r);
}else{
nUpdate--;
if( chnged ){
if( verboseFlag ) fossil_print("EDITED %s\n", zName);
}else{
db_bind_int(&mtimeXfer, ":idv", idv);
db_bind_int(&mtimeXfer, ":idt", idt);
db_step(&mtimeXfer);
db_reset(&mtimeXfer);
if( verboseFlag ) fossil_print("UNCHANGED %s\n", zName);
}
}
free(zFullPath);
free(zFullNewPath);
}
db_finalize(&q);
db_finalize(&mtimeXfer);
fossil_print("%.79c\n",'-');
if( nUpdate==0 ){
show_common_info(tid, "checkout:", 1, 0);
fossil_print("%-13s None. Already up-to-date\n", "changes:");
}else{
show_common_info(tid, "updated-to:", 1, 0);
fossil_print("%-13s %d file%s modified.\n", "changes:",
nUpdate, nUpdate>1 ? "s" : "");
}
/* Report on conflicts
*/
if( !nochangeFlag ){
Stmt q;
int nMerge = 0;
db_prepare(&q, "SELECT uuid, id FROM vmerge JOIN blob ON merge=rid"
|
| ︙ | ︙ |