{"thread":{"id":"6372","subject":"[PATCH 2/2] Convert output messages in merge-recursive to past tense.","startedAt":"2007-01-14T08:11:28Z","lastAt":"2007-01-14T08:11:28Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"31679","messageId":"20070114081128.GB19566@spearce.org","threadId":"6372","inReplyTo":"9ea4596ac973e294eee5eeda441589d3d8b28133.1168762240.git.spearce@spearce.org","subject":"[PATCH 2/2] Convert output messages in merge-recursive to past tense.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-01-14T08:11:28Z","receivedAt":"2007-01-14T08:11:28Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Now that we are showing the output messages for verbosity levels\n<5 after all actions have been performed (due to the progress meter\nrunning during the actions) it can be confusing to see messages in\nthe present tense when the user is looking at a '100% done' message\nright above them.  Converting the messages to past tense will appear\nmore correct in this case, and shouldn't affect a developer who is\ndebugging the application and running it at a verbosity level >=5.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n merge-recursive.c |   36 ++++++++++++++++++------------------\n 1 files changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 2a89461..c9f0d81 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -724,13 +724,13 @@ static void conflict_rename_rename(struct rename *ren1,\n \tconst char *dst_name2 = ren2_dst;\n \tif (path_list_has_path(&current_directory_set, ren1_dst)) {\n \t\tdst_name1 = del[delp++] = unique_path(ren1_dst, branch1);\n-\t\toutput(1, \"%s is a directory in %s adding as %s instead\",\n+\t\toutput(1, \"%s is a directory in %s added as %s instead\",\n \t\t       ren1_dst, branch2, dst_name1);\n \t\tremove_file(0, ren1_dst, 0);\n \t}\n \tif (path_list_has_path(&current_directory_set, ren2_dst)) {\n \t\tdst_name2 = del[delp++] = unique_path(ren2_dst, branch2);\n-\t\toutput(1, \"%s is a directory in %s adding as %s instead\",\n+\t\toutput(1, \"%s is a directory in %s added as %s instead\",\n \t\t       ren2_dst, branch1, dst_name2);\n \t\tremove_file(0, ren2_dst, 0);\n \t}\n@@ -744,7 +744,7 @@ static void conflict_rename_dir(struct rename *ren1,\n \t\t\t\tconst char *branch1)\n {\n \tchar *new_path = unique_path(ren1->pair->two->path, branch1);\n-\toutput(1, \"Renaming %s to %s instead\", ren1->pair->one->path, new_path);\n+\toutput(1, \"Renamed %s to %s instead\", ren1->pair->one->path, new_path);\n \tremove_file(0, ren1->pair->two->path, 0);\n \tupdate_file(0, ren1->pair->two->sha1, ren1->pair->two->mode, new_path);\n \tfree(new_path);\n@@ -757,7 +757,7 @@ static void conflict_rename_rename_2(struct rename *ren1,\n {\n \tchar *new_path1 = unique_path(ren1->pair->two->path, branch1);\n \tchar *new_path2 = unique_path(ren2->pair->two->path, branch2);\n-\toutput(1, \"Renaming %s to %s and %s to %s instead\",\n+\toutput(1, \"Renamed %s to %s and %s to %s instead\",\n \t       ren1->pair->one->path, new_path1,\n \t       ren2->pair->one->path, new_path2);\n \tremove_file(0, ren1->pair->two->path, 0);\n@@ -865,10 +865,10 @@ static int process_renames(struct path_list *a_renames,\n \t\t\t\t\t\t branch1,\n \t\t\t\t\t\t branch2);\n \t\t\t\tif (mfi.merge || !mfi.clean)\n-\t\t\t\t\toutput(2, \"Renaming %s->%s\", src, ren1_dst);\n+\t\t\t\t\toutput(2, \"Renamed %s->%s\", src, ren1_dst);\n \n \t\t\t\tif (mfi.merge)\n-\t\t\t\t\toutput(2, \"Auto-merging %s\", ren1_dst);\n+\t\t\t\t\toutput(2, \"Auto-merged %s\", ren1_dst);\n \n \t\t\t\tif (!mfi.clean) {\n \t\t\t\t\toutput(1, \"CONFLICT (content): merge conflict in %s\",\n@@ -902,14 +902,14 @@ static int process_renames(struct path_list *a_renames,\n \n \t\t\tif (path_list_has_path(&current_directory_set, ren1_dst)) {\n \t\t\t\tclean_merge = 0;\n-\t\t\t\toutput(1, \"CONFLICT (rename/directory): Rename %s->%s in %s \"\n+\t\t\t\toutput(1, \"CONFLICT (rename/directory): Renamed %s->%s in %s \"\n \t\t\t\t       \" directory %s added in %s\",\n \t\t\t\t       ren1_src, ren1_dst, branch1,\n \t\t\t\t       ren1_dst, branch2);\n \t\t\t\tconflict_rename_dir(ren1, branch1);\n \t\t\t} else if (sha_eq(src_other.sha1, null_sha1)) {\n \t\t\t\tclean_merge = 0;\n-\t\t\t\toutput(1, \"CONFLICT (rename/delete): Rename %s->%s in %s \"\n+\t\t\t\toutput(1, \"CONFLICT (rename/delete): Renamed %s->%s in %s \"\n \t\t\t\t       \"and deleted in %s\",\n \t\t\t\t       ren1_src, ren1_dst, branch1,\n \t\t\t\t       branch2);\n@@ -918,19 +918,19 @@ static int process_renames(struct path_list *a_renames,\n \t\t\t\tconst char *new_path;\n \t\t\t\tclean_merge = 0;\n \t\t\t\ttry_merge = 1;\n-\t\t\t\toutput(1, \"CONFLICT (rename/add): Rename %s->%s in %s. \"\n+\t\t\t\toutput(1, \"CONFLICT (rename/add): Renamed %s->%s in %s. \"\n \t\t\t\t       \"%s added in %s\",\n \t\t\t\t       ren1_src, ren1_dst, branch1,\n \t\t\t\t       ren1_dst, branch2);\n \t\t\t\tnew_path = unique_path(ren1_dst, branch2);\n-\t\t\t\toutput(1, \"Adding as %s instead\", new_path);\n+\t\t\t\toutput(1, \"Added as %s instead\", new_path);\n \t\t\t\tupdate_file(0, dst_other.sha1, dst_other.mode, new_path);\n \t\t\t} else if ((item = path_list_lookup(ren1_dst, renames2Dst))) {\n \t\t\t\tren2 = item->util;\n \t\t\t\tclean_merge = 0;\n \t\t\t\tren2->processed = 1;\n-\t\t\t\toutput(1, \"CONFLICT (rename/rename): Rename %s->%s in %s. \"\n-\t\t\t\t       \"Rename %s->%s in %s\",\n+\t\t\t\toutput(1, \"CONFLICT (rename/rename): Renamed %s->%s in %s. \"\n+\t\t\t\t       \"Renamed %s->%s in %s\",\n \t\t\t\t       ren1_src, ren1_dst, branch1,\n \t\t\t\t       ren2->pair->one->path, ren2->pair->two->path, branch2);\n \t\t\t\tconflict_rename_rename_2(ren1, branch1, ren2, branch2);\n@@ -954,9 +954,9 @@ static int process_renames(struct path_list *a_renames,\n \t\t\t\t\t\ta_branch, b_branch);\n \n \t\t\t\tif (mfi.merge || !mfi.clean)\n-\t\t\t\t\toutput(2, \"Renaming %s => %s\", ren1_src, ren1_dst);\n+\t\t\t\t\toutput(2, \"Renamed %s => %s\", ren1_src, ren1_dst);\n \t\t\t\tif (mfi.merge)\n-\t\t\t\t\toutput(2, \"Auto-merging %s\", ren1_dst);\n+\t\t\t\t\toutput(2, \"Auto-merged %s\", ren1_dst);\n \t\t\t\tif (!mfi.clean) {\n \t\t\t\t\toutput(1, \"CONFLICT (rename/modify): Merge conflict in %s\",\n \t\t\t\t\t       ren1_dst);\n@@ -1006,7 +1006,7 @@ static int process_entry(const char *path, struct stage_data *entry,\n \t\t\t/* Deleted in both or deleted in one and\n \t\t\t * unchanged in the other */\n \t\t\tif (a_sha)\n-\t\t\t\toutput(2, \"Removing %s\", path);\n+\t\t\t\toutput(2, \"Removed %s\", path);\n \t\t\t/* do not touch working file if it did not exist */\n \t\t\tremove_file(1, path, !a_sha);\n \t\t} else {\n@@ -1053,12 +1053,12 @@ static int process_entry(const char *path, struct stage_data *entry,\n \t\t\tconst char *new_path = unique_path(path, add_branch);\n \t\t\tclean_merge = 0;\n \t\t\toutput(1, \"CONFLICT (%s): There is a directory with name %s in %s. \"\n-\t\t\t       \"Adding %s as %s\",\n+\t\t\t       \"Added %s as %s\",\n \t\t\t       conf, path, other_branch, path, new_path);\n \t\t\tremove_file(0, path, 0);\n \t\t\tupdate_file(0, sha, mode, new_path);\n \t\t} else {\n-\t\t\toutput(2, \"Adding %s\", path);\n+\t\t\toutput(2, \"Added %s\", path);\n \t\t\tupdate_file(1, sha, mode, path);\n \t\t}\n \t} else if (a_sha && b_sha) {\n@@ -1072,7 +1072,7 @@ static int process_entry(const char *path, struct stage_data *entry,\n \t\t\treason = \"add/add\";\n \t\t\to_sha = (unsigned char *)null_sha1;\n \t\t}\n-\t\toutput(2, \"Auto-merging %s\", path);\n+\t\toutput(2, \"Auto-merged %s\", path);\n \t\to.path = a.path = b.path = (char *)path;\n \t\thashcpy(o.sha1, o_sha);\n \t\to.mode = o_mode;\n-- \n1.5.0.rc1.g4494\n"}]}