{"thread":{"id":"14959","subject":"TOPGIT: [PATCH] tg create: add --force option to resolve merge dependencies.","startedAt":"2008-08-12T13:01:46Z","lastAt":"2008-08-12T17:55:16Z","messageCount":4,"participants":["Jan Nieuwenhuizen","Petr Baudis","Bert Wesarg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"86928","messageId":"1218546106.7264.11.camel@heerbeest","threadId":"14959","inReplyTo":null,"subject":"TOPGIT: [PATCH] tg create: add --force option to resolve merge dependencies.","fromName":"Jan Nieuwenhuizen","fromEmail":"janneke-list@xs4all.nl","sentAt":"2008-08-12T13:01:46Z","receivedAt":"2008-08-12T13:01:46Z","isPatch":true,"sender":{"key":"janneke-list@xs4all.nl","avatar":null},"body":"I have been trying to adapt my ooo-build export to topgit\ninstead of plain git and ran into the (documented and\nexpected) merge conflicts in .top*.\n\nAfter unsuccesfully trying to script around it in my\ngob git-export script, I found that this simple tg-create.sh\nseems to work for me: just remove any <<<,===,>>> from\n.topdeps and simply generate the new .topmgs later.\n\nWhat do you think?  Is this naive way of 'auto' resolving\ndependency problems doing the right thing?\n\nBTW: thanks for creating topgit, it looks like just what\n     I was missing.\n\n-- janneke\n\nSigned-off-by: Jan Nieuwenhuizen <janneke@gnu.org>\n---\n tg-create.sh |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/tg-create.sh b/tg-create.sh\nindex 6cce7ed..0c83460 100644\n--- a/tg-create.sh\n+++ b/tg-create.sh\n@@ -14,6 +14,8 @@ name=\n while [ -n \"$1\" ]; do\n \targ=\"$1\"; shift\n \tcase \"$arg\" in\n+\t--force)\n+\t\tforce=1;;\n \t-*)\n \t\techo \"Usage: tg create NAME [DEPS...]\" >&2\n \t\texit 1;;\n@@ -82,6 +84,11 @@ while [ -n \"$merge\" ]; do\n \tinfo \"Merging $name base with $branch...\"\n \n \tif ! git merge \"$branch\"; then\n+\t    if test \"$force\" = \"1\"; then\n+                mv .topdeps .topdeps~ && grep -Ev '(<|>|=){7}' .topdeps~ > .topdeps && rm .topdeps~\n+                git add .topdeps .topmsg\n+                git commit -am 'Auto-resolve topgit .top* merge failure.'\n+\t    else\n \t\tinfo \"Please commit merge resolution and call: tg create\"\n \t\tinfo \"It is also safe to abort this operation using \\`git reset --hard\\`\"\n \t\tinfo \"but please remember you are on the base branch now;\"\n@@ -89,6 +96,7 @@ while [ -n \"$merge\" ]; do\n \t\techo \"$deps\" >\"$git_dir/top-deps\"\n \t\techo \"$merge\" >\"$git_dir/top-merge\"\n \t\texit 2\n+\t    fi\n \tfi\n done\n \n-- \n1.6.0.rc0.44.g67270\n\n\n-- \nJan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter\nhttp://www.xs4all.nl/~jantien       | http://www.lilypond.org\n"},{"id":"86930","messageId":"20080812133857.GL32184@machine.or.cz","threadId":"14959","inReplyTo":"1218546106.7264.11.camel@heerbeest","subject":"Re: TOPGIT: [PATCH] tg create: add --force option to resolve merge dependencies.","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-08-12T13:38:57Z","receivedAt":"2008-08-12T13:38:57Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nOn Tue, Aug 12, 2008 at 03:01:46PM +0200, Jan Nieuwenhuizen wrote:\n> I have been trying to adapt my ooo-build export to topgit\n> instead of plain git and ran into the (documented and\n> expected) merge conflicts in .top*.\n> \n> After unsuccesfully trying to script around it in my\n> gob git-export script, I found that this simple tg-create.sh\n> seems to work for me: just remove any <<<,===,>>> from\n> .topdeps and simply generate the new .topmgs later.\n> \n> What do you think?  Is this naive way of 'auto' resolving\n> dependency problems doing the right thing?\n\n  how exactly did you get the morge conflicts? These should never happen\n- I don't think we document them either? Pre-0.2 TopGit with dash as\n/bin/sh had a bug that caused the conflicts to still happen, but that\nshould've been fixed (check if your .git/info/attributes does not\ncontain '-e' at the line beginnings ;-).\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nThe next generation of interesting software will be done\non the Macintosh, not the IBM PC.  -- Bill Gates\n"},{"id":"86933","messageId":"1218553338.7264.14.camel@heerbeest","threadId":"14959","inReplyTo":"20080812133857.GL32184@machine.or.cz","subject":"Re: TOPGIT: [PATCH] tg create: add --force option to resolve merge dependencies.","fromName":"Jan Nieuwenhuizen","fromEmail":"janneke-list@xs4all.nl","sentAt":"2008-08-12T15:02:18Z","receivedAt":"2008-08-12T15:02:18Z","isPatch":true,"sender":{"key":"janneke-list@xs4all.nl","avatar":null},"body":"On di, 2008-08-12 at 15:38 +0200, Petr Baudis wrote:\n\n>   how exactly did you get the morge conflicts?\n\nI'm not sure, cannot seem to reproduce them anymore.  May\nhave been pre-0.2 issue or another goof-up over here.\n\nThanks.\n\n-- \nJan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter\nhttp://www.xs4all.nl/~jantien       | http://www.lilypond.org\n"},{"id":"86953","messageId":"36ca99e90808121055v5efcc1do68731b905a359a68@mail.gmail.com","threadId":"14959","inReplyTo":"1218553338.7264.14.camel@heerbeest","subject":"Re: TOPGIT: [PATCH] tg create: add --force option to resolve merge dependencies.","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-08-12T17:55:16Z","receivedAt":"2008-08-12T17:55:16Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Tue, Aug 12, 2008 at 17:02, Jan Nieuwenhuizen <janneke-list@xs4all.nl> wrote:\n> On di, 2008-08-12 at 15:38 +0200, Petr Baudis wrote:\n>\n>>   how exactly did you get the morge conflicts?\n>\n> I'm not sure, cannot seem to reproduce them anymore.  May\n> have been pre-0.2 issue or another goof-up over here.\nCould be, there was a fix for this from me. If you have a\n.git/info/gitattributes file, you where hit by the bug. But with 0.2\nthis is gone.\n\nBert\n>\n> Thanks.\n"}]}