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.

andygoth 2015-07-14 21:53 UTC trunk
Commit a19c1f428614b878a9cd7ec75a0a75296d56f270
2 files changed +2 -2 +3 -3
+2 -2
--- src/undo.c
+++ src/undo.c
@@ -74,13 +74,13 @@
7474
if( old_exists ){
7575
db_ephemeral_blob(&q, 0, &new);
7676
}
7777
if( old_exists ){
7878
if( new_exists ){
79
- fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
79
+ fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
8080
}else{
81
- fossil_print("NEW %s\n", zPathname);
81
+ fossil_print("NEW %s\n", zPathname);
8282
}
8383
if( new_exists && (new_link || old_link) ){
8484
file_delete(zFullname);
8585
}
8686
if( old_link ){
8787
--- 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 @@
784784
errCode = historical_version_of_file(zRevision, zFile, &record,
785785
&isLink, &isExe, 0, 2);
786786
if( errCode==2 ){
787787
if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q",
788788
zFile, zFile)==0 ){
789
- fossil_print("UNMANAGE: %s\n", zFile);
789
+ fossil_print("UNMANAGE %s\n", zFile);
790790
}else{
791791
undo_save(zFile);
792792
file_delete(zFull);
793
- fossil_print("DELETE: %s\n", zFile);
793
+ fossil_print("DELETE %s\n", zFile);
794794
}
795795
db_multi_exec(
796796
"UPDATE OR REPLACE vfile"
797797
" SET pathname=origname, origname=NULL"
798798
" WHERE pathname=%Q AND origname!=pathname;"
@@ -809,11 +809,11 @@
809809
symlink_create(blob_str(&record), zFull);
810810
}else{
811811
blob_write_to_file(&record, zFull);
812812
}
813813
file_wd_setexe(zFull, isExe);
814
- fossil_print("REVERTED: %s\n", zFile);
814
+ fossil_print("REVERT %s\n", zFile);
815815
mtime = file_wd_mtime(zFull);
816816
db_multi_exec(
817817
"UPDATE vfile"
818818
" SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid"
819819
" WHERE pathname=%Q OR origname=%Q",
820820
--- 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

Keyboard Shortcuts

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