@matheusbsbs / matheus-bagliano / commits / 89f40be294
Fork 0

Convert output messages in merge-recursive to past tense.

Now that we are showing the output messages for verbosity levels <5 after all actions have been performed (due to the progress meter running during the actions) it can be confusing to see messages in the present tense when the user is looking at a '100% done' message right above them. Converting the messages to past tense will appear more correct in this case, and shouldn't affect a developer who is debugging the application and running it at a verbosity level >=5. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Jan 14, 2007 at 03:11 UTC 89f40be294363ce4d14ed6931a65561a4e8e9140
1 file changed +18 -18
merge-recursive.c
+18 -18
@@ -724,13 +724,13 @@ static void conflict_rename_rename(struct rename *ren1,
724 const char *dst_name2 = ren2_dst;
725 if (path_list_has_path(&current_directory_set, ren1_dst)) {
726 dst_name1 = del[delp++] = unique_path(ren1_dst, branch1);
727 - output(1, "%s is a directory in %s adding as %s instead",
727 + output(1, "%s is a directory in %s added as %s instead",
728 ren1_dst, branch2, dst_name1);
729 remove_file(0, ren1_dst, 0);
730 }
731 if (path_list_has_path(&current_directory_set, ren2_dst)) {
732 dst_name2 = del[delp++] = unique_path(ren2_dst, branch2);
733 - output(1, "%s is a directory in %s adding as %s instead",
733 + output(1, "%s is a directory in %s added as %s instead",
734 ren2_dst, branch1, dst_name2);
735 remove_file(0, ren2_dst, 0);
736 }
@@ -744,7 +744,7 @@ static void conflict_rename_dir(struct rename *ren1,
744 const char *branch1)
745 {
746 char *new_path = unique_path(ren1->pair->two->path, branch1);
747 - output(1, "Renaming %s to %s instead", ren1->pair->one->path, new_path);
747 + output(1, "Renamed %s to %s instead", ren1->pair->one->path, new_path);
748 remove_file(0, ren1->pair->two->path, 0);
749 update_file(0, ren1->pair->two->sha1, ren1->pair->two->mode, new_path);
750 free(new_path);
@@ -757,7 +757,7 @@ static void conflict_rename_rename_2(struct rename *ren1,
757 {
758 char *new_path1 = unique_path(ren1->pair->two->path, branch1);
759 char *new_path2 = unique_path(ren2->pair->two->path, branch2);
760 - output(1, "Renaming %s to %s and %s to %s instead",
760 + output(1, "Renamed %s to %s and %s to %s instead",
761 ren1->pair->one->path, new_path1,
762 ren2->pair->one->path, new_path2);
763 remove_file(0, ren1->pair->two->path, 0);
@@ -865,10 +865,10 @@ static int process_renames(struct path_list *a_renames,
865 branch1,
866 branch2);
867 if (mfi.merge || !mfi.clean)
868 - output(1, "Renaming %s->%s", src, ren1_dst);
868 + output(1, "Renamed %s->%s", src, ren1_dst);
869
870 if (mfi.merge)
871 - output(2, "Auto-merging %s", ren1_dst);
871 + output(2, "Auto-merged %s", ren1_dst);
872
873 if (!mfi.clean) {
874 output(1, "CONFLICT (content): merge conflict in %s",
@@ -902,14 +902,14 @@ static int process_renames(struct path_list *a_renames,
902
903 if (path_list_has_path(&current_directory_set, ren1_dst)) {
904 clean_merge = 0;
905 - output(1, "CONFLICT (rename/directory): Rename %s->%s in %s "
905 + output(1, "CONFLICT (rename/directory): Renamed %s->%s in %s "
906 " directory %s added in %s",
907 ren1_src, ren1_dst, branch1,
908 ren1_dst, branch2);
909 conflict_rename_dir(ren1, branch1);
910 } else if (sha_eq(src_other.sha1, null_sha1)) {
911 clean_merge = 0;
912 - output(1, "CONFLICT (rename/delete): Rename %s->%s in %s "
912 + output(1, "CONFLICT (rename/delete): Renamed %s->%s in %s "
913 "and deleted in %s",
914 ren1_src, ren1_dst, branch1,
915 branch2);
@@ -918,19 +918,19 @@ static int process_renames(struct path_list *a_renames,
918 const char *new_path;
919 clean_merge = 0;
920 try_merge = 1;
921 - output(1, "CONFLICT (rename/add): Rename %s->%s in %s. "
921 + output(1, "CONFLICT (rename/add): Renamed %s->%s in %s. "
922 "%s added in %s",
923 ren1_src, ren1_dst, branch1,
924 ren1_dst, branch2);
925 new_path = unique_path(ren1_dst, branch2);
926 - output(1, "Adding as %s instead", new_path);
926 + output(1, "Added as %s instead", new_path);
927 update_file(0, dst_other.sha1, dst_other.mode, new_path);
928 } else if ((item = path_list_lookup(ren1_dst, renames2Dst))) {
929 ren2 = item->util;
930 clean_merge = 0;
931 ren2->processed = 1;
932 - output(1, "CONFLICT (rename/rename): Rename %s->%s in %s. "
933 - "Rename %s->%s in %s",
932 + output(1, "CONFLICT (rename/rename): Renamed %s->%s in %s. "
933 + "Renamed %s->%s in %s",
934 ren1_src, ren1_dst, branch1,
935 ren2->pair->one->path, ren2->pair->two->path, branch2);
936 conflict_rename_rename_2(ren1, branch1, ren2, branch2);
@@ -954,9 +954,9 @@ static int process_renames(struct path_list *a_renames,
954 a_branch, b_branch);
955
956 if (mfi.merge || !mfi.clean)
957 - output(1, "Renaming %s => %s", ren1_src, ren1_dst);
957 + output(1, "Renamed %s => %s", ren1_src, ren1_dst);
958 if (mfi.merge)
959 - output(2, "Auto-merging %s", ren1_dst);
959 + output(2, "Auto-merged %s", ren1_dst);
960 if (!mfi.clean) {
961 output(1, "CONFLICT (rename/modify): Merge conflict in %s",
962 ren1_dst);
@@ -1006,7 +1006,7 @@ static int process_entry(const char *path, struct stage_data *entry,
1006 /* Deleted in both or deleted in one and
1007 * unchanged in the other */
1008 if (a_sha)
1009 - output(2, "Removing %s", path);
1009 + output(2, "Removed %s", path);
1010 /* do not touch working file if it did not exist */
1011 remove_file(1, path, !a_sha);
1012 } else {
@@ -1053,12 +1053,12 @@ static int process_entry(const char *path, struct stage_data *entry,
1053 const char *new_path = unique_path(path, add_branch);
1054 clean_merge = 0;
1055 output(1, "CONFLICT (%s): There is a directory with name %s in %s. "
1056 - "Adding %s as %s",
1056 + "Added %s as %s",
1057 conf, path, other_branch, path, new_path);
1058 remove_file(0, path, 0);
1059 update_file(0, sha, mode, new_path);
1060 } else {
1061 - output(2, "Adding %s", path);
1061 + output(2, "Added %s", path);
1062 update_file(1, sha, mode, path);
1063 }
1064 } else if (a_sha && b_sha) {
@@ -1072,7 +1072,7 @@ static int process_entry(const char *path, struct stage_data *entry,
1072 reason = "add/add";
1073 o_sha = (unsigned char *)null_sha1;
1074 }
1075 - output(2, "Auto-merging %s", path);
1075 + output(2, "Auto-merged %s", path);
1076 o.path = a.path = b.path = (char *)path;
1077 hashcpy(o.sha1, o_sha);
1078 o.mode = o_mode;