{"thread":{"id":"25104","subject":"Import existing (old) topic branches in topgit","startedAt":"2010-09-14T20:44:22Z","lastAt":"2010-09-15T04:55:09Z","messageCount":2,"participants":["Guilhem Bonnefille","martin f krafft"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150712","messageId":"AANLkTima2NsEWuT85oFZGpfCQrsrqy5KsQSOez3B9i-7@mail.gmail.com","threadId":"25104","inReplyTo":null,"subject":"Import existing (old) topic branches in topgit","fromName":"Guilhem Bonnefille","fromEmail":"guilhem.bonnefille@gmail.com","sentAt":"2010-09-14T20:44:22Z","receivedAt":"2010-09-14T20:44:22Z","isPatch":false,"sender":{"key":"guilhem.bonnefille@gmail.com","avatar":"https://gravatar.com/avatar/375364bfee1f61197c540e37465abe3619fc24eb3a36b0edcea7f15b124036b0?d=mp&s=160"},"body":"Hi all,\n\nAfter trying to manually maintain many topic branches before sending\nthem upstream, I recently discovered that topgit seems to become my\nbest friend.\n\nBut as I'm new to this tool, I don't know what's the best way to\nimport existing branches in topgit.\n\nWhat I mean is:\n* I already have topic branches, with long history and regular merges\nwith upstream.\n* I want to manage the related topic via topgit\n* I whish to keep my own history (if possible)\n\n\nCan experimented users give me some tips on how to do this?\n\nThanks in advance.\n-- \nGuilhem BONNEFILLE\n-=- JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com\n-=- mailto:guilhem.bonnefille@gmail.com\n-=- http://nathguil.free.fr/\n"},{"id":"150724","messageId":"20100915045509.GA16770@fishbowl.rw.madduck.net","threadId":"25104","inReplyTo":"AANLkTima2NsEWuT85oFZGpfCQrsrqy5KsQSOez3B9i-7@mail.gmail.com","subject":"Re: Import existing (old) topic branches in topgit","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2010-09-15T04:55:09Z","receivedAt":"2010-09-15T04:55:09Z","isPatch":false,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Guilhem Bonnefille <guilhem.bonnefille@gmail.com> [2010.09.14.2244 +0200]:\n> But as I'm new to this tool, I don't know what's the best way to\n> import existing branches in topgit.\n\nThere is tg-import, but it looks like it rewrites the history, which\nyou might not want.\n\nThis should be trivially possible, and it would be nice if TopGit\ncould help you, but for now you will have to do this manually. The\nfollowing is an example for the simple case when branch foo depends\non master, and you want to convert foo:\n\n1. git checkout foo    # the topic branch\n2. git update-ref refs/top-bases/foo $(git merge-base master HEAD)\n3. echo master > .topdeps\n4. git format-patch --stdout -s HEAD^ | sed -e 1d -e '/---/,$d' -e '/^Date:/d' > .topmsg\n5. git add .top(deps|msg)\n6. git commit -sm'convrting branch to topgit format'\n7. tg summary\n\nNow: will you write a new tg-import or tg-convert? ;)\n\nCheers,\n\n-- \nmartin | http://madduck.net/ | http://two.sentenc.es/\n \na: no.\nq: should i include quotations after my reply?\n \nspamtraps: madduck.bogus@madduck.net\n"}]}