Fossil SCM
Change formatting of undo/redo/revert command prints for consistency with other commands. Revert used to print "ACTION: filename", now prints "ACTION filename", where number of spaces between ACTION and filename is chosen to maintain column alignment. Likewise undo and redo, except they did not previously use ":". Also change "REVERTED" to "REVERT" to match verbe tense used throughout.
Commit
a19c1f428614b878a9cd7ec75a0a75296d56f270
Parent
1bf792eeeb4171f…
2 files changed
+2
-2
+3
-3
+2
-2
| --- src/undo.c | ||
| +++ src/undo.c | ||
| @@ -74,13 +74,13 @@ | ||
| 74 | 74 | if( old_exists ){ |
| 75 | 75 | db_ephemeral_blob(&q, 0, &new); |
| 76 | 76 | } |
| 77 | 77 | if( old_exists ){ |
| 78 | 78 | if( new_exists ){ |
| 79 | - fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); | |
| 79 | + fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); | |
| 80 | 80 | }else{ |
| 81 | - fossil_print("NEW %s\n", zPathname); | |
| 81 | + fossil_print("NEW %s\n", zPathname); | |
| 82 | 82 | } |
| 83 | 83 | if( new_exists && (new_link || old_link) ){ |
| 84 | 84 | file_delete(zFullname); |
| 85 | 85 | } |
| 86 | 86 | if( old_link ){ |
| 87 | 87 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -74,13 +74,13 @@ | |
| 74 | if( old_exists ){ |
| 75 | db_ephemeral_blob(&q, 0, &new); |
| 76 | } |
| 77 | if( old_exists ){ |
| 78 | if( new_exists ){ |
| 79 | fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); |
| 80 | }else{ |
| 81 | fossil_print("NEW %s\n", zPathname); |
| 82 | } |
| 83 | if( new_exists && (new_link || old_link) ){ |
| 84 | file_delete(zFullname); |
| 85 | } |
| 86 | if( old_link ){ |
| 87 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -74,13 +74,13 @@ | |
| 74 | if( old_exists ){ |
| 75 | db_ephemeral_blob(&q, 0, &new); |
| 76 | } |
| 77 | if( old_exists ){ |
| 78 | if( new_exists ){ |
| 79 | fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); |
| 80 | }else{ |
| 81 | fossil_print("NEW %s\n", zPathname); |
| 82 | } |
| 83 | if( new_exists && (new_link || old_link) ){ |
| 84 | file_delete(zFullname); |
| 85 | } |
| 86 | if( old_link ){ |
| 87 |
+3
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -784,15 +784,15 @@ | ||
| 784 | 784 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 785 | 785 | &isLink, &isExe, 0, 2); |
| 786 | 786 | if( errCode==2 ){ |
| 787 | 787 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 788 | 788 | zFile, zFile)==0 ){ |
| 789 | - fossil_print("UNMANAGE: %s\n", zFile); | |
| 789 | + fossil_print("UNMANAGE %s\n", zFile); | |
| 790 | 790 | }else{ |
| 791 | 791 | undo_save(zFile); |
| 792 | 792 | file_delete(zFull); |
| 793 | - fossil_print("DELETE: %s\n", zFile); | |
| 793 | + fossil_print("DELETE %s\n", zFile); | |
| 794 | 794 | } |
| 795 | 795 | db_multi_exec( |
| 796 | 796 | "UPDATE OR REPLACE vfile" |
| 797 | 797 | " SET pathname=origname, origname=NULL" |
| 798 | 798 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -809,11 +809,11 @@ | ||
| 809 | 809 | symlink_create(blob_str(&record), zFull); |
| 810 | 810 | }else{ |
| 811 | 811 | blob_write_to_file(&record, zFull); |
| 812 | 812 | } |
| 813 | 813 | file_wd_setexe(zFull, isExe); |
| 814 | - fossil_print("REVERTED: %s\n", zFile); | |
| 814 | + fossil_print("REVERT %s\n", zFile); | |
| 815 | 815 | mtime = file_wd_mtime(zFull); |
| 816 | 816 | db_multi_exec( |
| 817 | 817 | "UPDATE vfile" |
| 818 | 818 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 819 | 819 | " WHERE pathname=%Q OR origname=%Q", |
| 820 | 820 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -784,15 +784,15 @@ | |
| 784 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 785 | &isLink, &isExe, 0, 2); |
| 786 | if( errCode==2 ){ |
| 787 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 788 | zFile, zFile)==0 ){ |
| 789 | fossil_print("UNMANAGE: %s\n", zFile); |
| 790 | }else{ |
| 791 | undo_save(zFile); |
| 792 | file_delete(zFull); |
| 793 | fossil_print("DELETE: %s\n", zFile); |
| 794 | } |
| 795 | db_multi_exec( |
| 796 | "UPDATE OR REPLACE vfile" |
| 797 | " SET pathname=origname, origname=NULL" |
| 798 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -809,11 +809,11 @@ | |
| 809 | symlink_create(blob_str(&record), zFull); |
| 810 | }else{ |
| 811 | blob_write_to_file(&record, zFull); |
| 812 | } |
| 813 | file_wd_setexe(zFull, isExe); |
| 814 | fossil_print("REVERTED: %s\n", zFile); |
| 815 | mtime = file_wd_mtime(zFull); |
| 816 | db_multi_exec( |
| 817 | "UPDATE vfile" |
| 818 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 819 | " WHERE pathname=%Q OR origname=%Q", |
| 820 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -784,15 +784,15 @@ | |
| 784 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 785 | &isLink, &isExe, 0, 2); |
| 786 | if( errCode==2 ){ |
| 787 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 788 | zFile, zFile)==0 ){ |
| 789 | fossil_print("UNMANAGE %s\n", zFile); |
| 790 | }else{ |
| 791 | undo_save(zFile); |
| 792 | file_delete(zFull); |
| 793 | fossil_print("DELETE %s\n", zFile); |
| 794 | } |
| 795 | db_multi_exec( |
| 796 | "UPDATE OR REPLACE vfile" |
| 797 | " SET pathname=origname, origname=NULL" |
| 798 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -809,11 +809,11 @@ | |
| 809 | symlink_create(blob_str(&record), zFull); |
| 810 | }else{ |
| 811 | blob_write_to_file(&record, zFull); |
| 812 | } |
| 813 | file_wd_setexe(zFull, isExe); |
| 814 | fossil_print("REVERT %s\n", zFile); |
| 815 | mtime = file_wd_mtime(zFull); |
| 816 | db_multi_exec( |
| 817 | "UPDATE vfile" |
| 818 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 819 | " WHERE pathname=%Q OR origname=%Q", |
| 820 |