{"thread":{"id":"18728","subject":"[PATCH v2] mergetool--lib: add new merge tool TortoiseMerge","startedAt":"2009-04-05T04:00:24Z","lastAt":"2009-04-06T09:27:36Z","messageCount":3,"participants":["David Aguilar","Brian Gernhardt"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"110380","messageId":"1238904024-11238-1-git-send-email-davvid@gmail.com","threadId":"18728","inReplyTo":null,"subject":"[PATCH v2] mergetool--lib: add new merge tool TortoiseMerge","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-05T04:00:24Z","receivedAt":"2009-04-05T04:00:24Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\n\nTortoiseMerge comes with TortoiseSVN or TortoiseGit for Windows. It can\nonly be used as a merge tool with an existing base file. It cannot be\nused without a base nor as a diff tool.\n\nThe documentation only mentions the slash '/' as command line option\nprefix, which refused to work, but the parser also accepts the dash '-'\n\nSee http://code.google.com/p/msysgit/issues/detail?id=226\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nThis is Markus' patch rebased on top of my latest refactoring\npatch.  It didn't apply cleanly so I figured I'd resolve the\nmerge myself.\n\n git-mergetool--lib.sh |   15 ++++++++++++++-\n 1 files changed, 14 insertions(+), 1 deletions(-)\n\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex dcd4516..268485a 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -46,10 +46,13 @@ check_unchanged () {\n \n valid_tool () {\n \tcase \"$1\" in\n-\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse)\n+\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse | tortoisemerge)\n \t\tif test \"$1\" = \"kompare\" && ! diff_mode; then\n \t\t\treturn 1\n \t\tfi\n+\t\tif test \"$1\" = \"tortoisemerge\" && ! merge_mode; then\n+\t\t\treturn 1\n+\t\tfi\n \t\t;; # happy\n \t*)\n \t\tif test -z \"$(get_merge_tool_cmd \"$1\")\"; then\n@@ -220,6 +223,16 @@ run_merge_tool () {\n \t\tfi\n \t\tstatus=$?\n \t\t;;\n+\ttortoisemerge)\n+\t\tif $base_present; then\n+\t\t\ttouch \"$BACKUP\"\n+\t\t\t\"$merge_tool_path\" -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\"\n+\t\t\tcheck_unchanged\n+\t\telse\n+\t\t\techo \"TortoiseMerge cannot be used without a base\" 1>&2\n+\t\t\tstatus=1\n+\t\tfi\n+\t\t;;\n \t*)\n \t\tif test -n \"$merge_tool_cmd\"; then\n \t\t\tif merge_mode &&\n-- \n1.6.2.1.469.gdffc1\n"},{"id":"110384","messageId":"DB42161D-8B55-4739-B418-D286B280EFF8@silverinsanity.com","threadId":"18728","inReplyTo":"1238904024-11238-1-git-send-email-davvid@gmail.com","subject":"Re: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2009-04-05T05:10:08Z","receivedAt":"2009-04-05T05:10:08Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Apr 5, 2009, at 12:00 AM, David Aguilar wrote:\n\n> diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\n> index dcd4516..268485a 100644\n> --- a/git-mergetool--lib.sh\n> +++ b/git-mergetool--lib.sh\n> @@ -46,10 +46,13 @@ check_unchanged () {\n>\n> valid_tool () {\n> \tcase \"$1\" in\n> -\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge |  \n> vimdiff | gvimdiff | ecmerge | diffuse)\n> +\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge |  \n> vimdiff | gvimdiff | ecmerge | diffuse | tortoisemerge)\n> \t\tif test \"$1\" = \"kompare\" && ! diff_mode; then\n> \t\t\treturn 1\n> \t\tfi\n> +\t\tif test \"$1\" = \"tortoisemerge\" && ! merge_mode; then\n> +\t\t\treturn 1\n> +\t\tfi\n> \t\t;; # happy\n> \t*)\n> \t\tif test -z \"$(get_merge_tool_cmd \"$1\")\"; then\n\nWhy is `case \"$1\"` being followed by two `if test \"$1\" =`s?\nWouldn't it be simpler to have separate case arms for them?\nEspecially with how long that list is getting...\n\n~~ Brian\n"},{"id":"110548","messageId":"20090406092736.GA16408@gmail.com","threadId":"18728","inReplyTo":"DB42161D-8B55-4739-B418-D286B280EFF8@silverinsanity.com","subject":"Re: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-06T09:27:36Z","receivedAt":"2009-04-06T09:27:36Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On  0, Brian Gernhardt <benji@silverinsanity.com> wrote:\n>\n> On Apr 5, 2009, at 12:00 AM, David Aguilar wrote:\n>\n>> valid_tool () {\n>> \tcase \"$1\" in\n>> \t<lots-of-stuff>)\n>> \t\tif test \"$1\" = \"kompare\" && ! diff_mode; then\n>> \t\t\treturn 1\n>> \t\tfi\n>> +\t\tif test \"$1\" = \"tortoisemerge\" && ! merge_mode; then\n>> +\t\t\treturn 1\n>> +\t\tfi\n>> \t\t;; # happy\n>> \t*)\n>> \t\tif test -z \"$(get_merge_tool_cmd \"$1\")\"; then\n>\n> Why is `case \"$1\"` being followed by two `if test \"$1\" =`s?\n> Wouldn't it be simpler to have separate case arms for them?\n> Especially with how long that list is getting...\n>\n> ~~ Brian\n\nIt would.  It wasn't until after the rewrite that I remembered\nthis email... oh well [PATCH v2 14/14] it is\n\n-- \n\n\tDavid\n"}]}