{"thread":{"id":"16405","subject":"[TopGit PATCH] Use the topological order when exporting explicitly listed branches.","startedAt":"2008-11-20T09:38:22Z","lastAt":"2008-11-20T10:54:32Z","messageCount":3,"participants":["martin f. krafft","Petr Baudis","martin f krafft"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96208","messageId":"1227173902-21180-1-git-send-email-madduck@debian.org","threadId":"16405","inReplyTo":null,"subject":"[TopGit PATCH] Use the topological order when exporting explicitly listed branches.","fromName":"martin f. krafft","fromEmail":"madduck@debian.org","sentAt":"2008-11-20T09:38:22Z","receivedAt":"2008-11-20T09:38:22Z","isPatch":true,"sender":{"key":"madduck@debian.org","avatar":null},"body":"From: Niko Tyni <ntyni@debian.org>\n\nWhen exporting explicitly listed branches (tg export -b), the branch\ndependencies were not taken into account.\n\nSigned-off-by: martin f. krafft <madduck@debian.org>\nTested-by: martin f. krafft <madduck@debian.org>\n---\nArguably, lines 178:189 need to be refactored due to the code duplication, but\nthe patch does what it should for now.\n\n tg-export.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/tg-export.sh b/tg-export.sh\nindex 52af88d..037b991 100644\n--- a/tg-export.sh\n+++ b/tg-export.sh\n@@ -181,9 +181,9 @@ if [ -z \"$branches\" ]; then\n \trecurse_deps driver \"$name\"\n \t(_ret=0; _dep=\"$name\"; _name=\"\"; _dep_is_tgish=1; driver)\n else\n-\techo \"$branches\" | tr ',' '\\n' | while read _dep; do\n-\t\t_dep_is_tgish=1\n-\t\t$driver\n+\techo \"$branches\" | tr ',' '\\n' | while read name; do\n+\t\trecurse_deps driver \"$name\"\n+\t\t(_ret=0; _dep=\"$name\"; _name=\"\"; _dep_is_tgish=1; driver)\n \tdone\n \tname=\"$(echo \"$branches\" | sed 's/.*,//')\"\n fi\n-- \n1.5.6.5\n"},{"id":"96211","messageId":"20081120102005.GB10491@machine.or.cz","threadId":"16405","inReplyTo":"1227173902-21180-1-git-send-email-madduck@debian.org","subject":"Re: [TopGit PATCH] Use the topological order when exporting explicitly listed branches.","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-11-20T10:20:05Z","receivedAt":"2008-11-20T10:20:05Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Thu, Nov 20, 2008 at 10:38:22AM +0100, martin f. krafft wrote:\n> From: Niko Tyni <ntyni@debian.org>\n> \n> When exporting explicitly listed branches (tg export -b), the branch\n> dependencies were not taken into account.\n> \n> Signed-off-by: martin f. krafft <madduck@debian.org>\n> Tested-by: martin f. krafft <madduck@debian.org>\n> ---\n> Arguably, lines 178:189 need to be refactored due to the code duplication, but\n> the patch does what it should for now.\n\nThe point of -b is to export only the specified branches, assuming you\nalready exported the dependencies before. If you just want to export a\nbranch with all its dependencies, why not just switch to it and call\nplain tg export?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nPeople who take cold baths never have rheumatism, but they have\ncold baths.\n"},{"id":"96215","messageId":"20081120105432.GB21374@piper.oerlikon.madduck.net","threadId":"16405","inReplyTo":"20081120102005.GB10491@machine.or.cz","subject":"Re: [TopGit PATCH] Use the topological order when exporting explicitly listed branches.","fromName":"martin f krafft","fromEmail":"madduck@debian.org","sentAt":"2008-11-20T10:54:32Z","receivedAt":"2008-11-20T10:54:32Z","isPatch":true,"sender":{"key":"madduck@debian.org","avatar":null},"body":"also sprach Petr Baudis <pasky@suse.cz> [2008.11.20.1120 +0100]:\n> The point of -b is to export only the specified branches, assuming you\n> already exported the dependencies before. If you just want to export a\n> branch with all its dependencies, why not just switch to it and call\n> plain tg export?\n\nAh, I see. I think then I probably failed to communicate what I had\nin mind with -b, which was mainly to avoid use of a temporary\nbranch where to collapse all commits before creating a series.\n\nI don't see the point of being able to export patches into a quilt\nseries without their dependencies. If needed, one could use tg-patch\nfor that. The only difference between tg-export -b and tg-patch is\nthat the former can do multiple patches in one go, and it writes\na series file. Since that series is not guaranteed to be applicable,\nI think one could just not bother.\n\nThinking about it a bit more, I think tg-export should be modified\nsuch that it can always take -b/--branches, which defaults to the\ncurrent branch. No matter what the driver, it always prepends the\ndependencies to the list. Then, the list is passed to the export\ndriver. 'collapse' creates a branch as it does right now, and\n'quilt' creates a series as it does right now.\n\nI have most of this implemented in a branch which I'll gladly\npublish as soon as I figured out some remaining corner cases.\n\n-- \n .''`.   martin f. krafft <madduck@debian.org>\n: :'  :  proud Debian developer, author, administrator, and user\n`. `'`   http://people.debian.org/~madduck - http://debiansystem.info\n  `-  Debian - when you have better things to do than fixing systems\n \n\"zum christentum wird man nicht geboren,\n man muß dazu nur krank genug sein.\"\n                                                 - friedrich nietzsche\n"}]}