{"thread":{"id":"16179","subject":"git-svn: Having a \"rare\" structure","startedAt":"2008-11-05T10:04:14Z","lastAt":"2008-11-05T17:46:19Z","messageCount":5,"participants":["Marc Fargas","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"94967","messageId":"2686a05b0811050204v59edc4a3h7f9ce6c6ecd13058@mail.gmail.com","threadId":"16179","inReplyTo":null,"subject":"git-svn: Having a \"rare\" structure","fromName":"Marc Fargas","fromEmail":"telenieko@telenieko.com","sentAt":"2008-11-05T10:04:14Z","receivedAt":"2008-11-05T10:04:14Z","isPatch":false,"sender":{"key":"telenieko@telenieko.com","avatar":"https://gravatar.com/avatar/ebd69c1f9f0ee5a4f7e2b309bc6747766c1b30444cf00d805e0121d8374cd642?d=mp&s=160"},"body":"Hi all,\n\nFirst of all, please CC responses to me as I'm not subscribed to this list ;)\n\nOn the subject, I use git-svn to for most of my stuff and also to\n\"interact\" with some SVN projects out there, there's one that is\ndriving me mad.\n\nThe Django project has a (somehow) rare SVN structure that I almost\nmanaget to make git-svn understand, but a recent \"rarity\" to the\nstructure broke it again and I haven't succeeded in making git-svn\nunderstand it, so I'm trying to get some guidance on how to make\ngit-svn understand the structure.\n\nRight know the Django SVN repo is like that:\nbrowse: http://code.djangoproject.com/browser/django\nsvn url:  http://code.djangoproject.com/svn/django\n\ntrunk/\ntags/notable_moments/\ntags/releases/\nbranches/*\nbranches/features/\nbranches/releases/\n\nUntil now, the last two didn't exist and git-svn was working nicely,\nbut now \"features\" and \"releases\" were created, and git-svn is taking\nthem as if they were branches, while they arent (branches are in\nsubdirectories of those two).\n\nMy git repo was done like that until now:\n\n    git svn init --prefix svn/\nhttp://code.djangoproject.com/svn/django -T trunk -b branches -t\n'tags/*/*'\n    git svn fetch\n\nWith that, git-svn understood that tags were in the subdirectories of\ntags/{notable_moments,releases}/ but I can't do that with the branches\nas there are branches also in the top branches/ directory.\n\nI do not really care about those branches on the top directory as\nthose are old, so I really only need git-svn to understand the\n{features,releases}/* thing. So:\n\nHow can I do something like \"-b branches/{features,releases}/*\" making\ngit-svn ignore the other top-level branches? Or, can I make it\nunderstand both, the top-level ones and the ones inside those two\nsubdirectories?\n\nNote that I just gueesed the \"-b branches/{features,releases}/*\"\nthing; I didn't try it, tryiing takes lots of time and bandwidth ;\\\\\n\nThanks for all,\nMarc\n-- \nhttp://www.marcfargas.com - will be finished someday.\n"},{"id":"94972","messageId":"49119AAD.2010803@drmicha.warpmail.net","threadId":"16179","inReplyTo":"2686a05b0811050204v59edc4a3h7f9ce6c6ecd13058@mail.gmail.com","subject":"Re: git-svn: Having a \"rare\" structure","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-11-05T13:07:57Z","receivedAt":"2008-11-05T13:07:57Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Marc Fargas venit, vidit, dixit 05.11.2008 11:04:\n> Hi all,\n> \n> First of all, please CC responses to me as I'm not subscribed to this list ;)\n> \n> On the subject, I use git-svn to for most of my stuff and also to\n> \"interact\" with some SVN projects out there, there's one that is\n> driving me mad.\n> \n> The Django project has a (somehow) rare SVN structure that I almost\n> managet to make git-svn understand, but a recent \"rarity\" to the\n> structure broke it again and I haven't succeeded in making git-svn\n> understand it, so I'm trying to get some guidance on how to make\n> git-svn understand the structure.\n> \n> Right know the Django SVN repo is like that:\n> browse: http://code.djangoproject.com/browser/django\n> svn url:  http://code.djangoproject.com/svn/django\n> \n> trunk/\n> tags/notable_moments/\n> tags/releases/\n> branches/*\n> branches/features/\n> branches/releases/\n> \n> Until now, the last two didn't exist and git-svn was working nicely,\n> but now \"features\" and \"releases\" were created, and git-svn is taking\n> them as if they were branches, while they arent (branches are in\n> subdirectories of those two).\n> \n> My git repo was done like that until now:\n> \n>     git svn init --prefix svn/\n> http://code.djangoproject.com/svn/django -T trunk -b branches -t\n> 'tags/*/*'\n>     git svn fetch\n> \n> With that, git-svn understood that tags were in the subdirectories of\n> tags/{notable_moments,releases}/ but I can't do that with the branches\n> as there are branches also in the top branches/ directory.\n> \n> I do not really care about those branches on the top directory as\n> those are old, so I really only need git-svn to understand the\n> {features,releases}/* thing. So:\n> \n> How can I do something like \"-b branches/{features,releases}/*\" making\n> git-svn ignore the other top-level branches? Or, can I make it\n> understand both, the top-level ones and the ones inside those two\n> subdirectories?\n\nYou can use \"-T trunk -t 'tags/*/*'\" and then set up the branches config\nby hand:\n\ngit config svn-remote.svn.branches\n'django/branches/features/*:refs/remotes/svn/features/*'\n\ngit config --add svn-remote.svn.branches\n'django/branches/releases/*:refs/remotes/svn/releases/*'\n\nIn fact, you should be able to use your previous branches config when\nfetching up to r9093, then switch to the config I suggested, and the\nfetch from r9094.\n\nCheers,\nMichael\n"},{"id":"94975","messageId":"2686a05b0811050736q520f1771t6ffa2840bfb3c308@mail.gmail.com","threadId":"16179","inReplyTo":"49119AAD.2010803@drmicha.warpmail.net","subject":"Re: git-svn: Having a \"rare\" structure","fromName":"Marc Fargas","fromEmail":"telenieko@telenieko.com","sentAt":"2008-11-05T15:36:34Z","receivedAt":"2008-11-05T15:36:34Z","isPatch":false,"sender":{"key":"telenieko@telenieko.com","avatar":"https://gravatar.com/avatar/ebd69c1f9f0ee5a4f7e2b309bc6747766c1b30444cf00d805e0121d8374cd642?d=mp&s=160"},"body":"Hi,\n\nOn Wed, Nov 5, 2008 at 2:07 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> git config svn-remote.svn.branches\n> 'django/branches/features/*:refs/remotes/svn/features/*'\n>\n> git config --add svn-remote.svn.branches\n> 'django/branches/releases/*:refs/remotes/svn/releases/*'\n>\n> In fact, you should be able to use your previous branches config when\n> fetching up to r9093, then switch to the config I suggested, and the\n> fetch from r9094.\n\nI'll try it right now, I have one q... I've been fetching from svn so\nI now have \"like a mess\" in the branches dir (and their history) is\nthere a way to make git-svn forget about everything after r9093 so I\ncan do the config change and re-fetch since then? That'd be awesome.\n\nThanks a lot for the tip! ;)\n\nSincerelly,\nMarc\n-- \nhttp://www.marcfargas.com - will be finished someday.\n"},{"id":"94979","messageId":"4911DADA.4010902@drmicha.warpmail.net","threadId":"16179","inReplyTo":"2686a05b0811050736q520f1771t6ffa2840bfb3c308@mail.gmail.com","subject":"Re: git-svn: Having a \"rare\" structure","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-11-05T17:41:46Z","receivedAt":"2008-11-05T17:41:46Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Marc Fargas venit, vidit, dixit 05.11.2008 16:36:\n> Hi,\n> \n> On Wed, Nov 5, 2008 at 2:07 PM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> git config svn-remote.svn.branches\n>> 'django/branches/features/*:refs/remotes/svn/features/*'\n>>\n>> git config --add svn-remote.svn.branches\n>> 'django/branches/releases/*:refs/remotes/svn/releases/*'\n>>\n>> In fact, you should be able to use your previous branches config when\n>> fetching up to r9093, then switch to the config I suggested, and the\n>> fetch from r9094.\n> \n> I'll try it right now, I have one q... I've been fetching from svn so\n> I now have \"like a mess\" in the branches dir (and their history) is\n> there a way to make git-svn forget about everything after r9093 so I\n> can do the config change and re-fetch since then? That'd be awesome.\n\nYou can delete the bogus branches (using git branch -rd or git\nupdate-ref -d), but I'm not sure if you can reset git svn's state info:\nYou may try messing with .git/svn/.metadata.\n\nI tried the approach I suggested in the last post for real, and things\nseem to work. Only gotcha is I don't know whether django folks will\nstick with putting branches under {releases,features}, that would create\nproblems.\n\nCheers,\nMichael\n"},{"id":"94981","messageId":"2686a05b0811050946n3aa524e2k5515967180ffb829@mail.gmail.com","threadId":"16179","inReplyTo":"4911DADA.4010902@drmicha.warpmail.net","subject":"Re: git-svn: Having a \"rare\" structure","fromName":"Marc Fargas","fromEmail":"telenieko@telenieko.com","sentAt":"2008-11-05T17:46:19Z","receivedAt":"2008-11-05T17:46:19Z","isPatch":false,"sender":{"key":"telenieko@telenieko.com","avatar":"https://gravatar.com/avatar/ebd69c1f9f0ee5a4f7e2b309bc6747766c1b30444cf00d805e0121d8374cd642?d=mp&s=160"},"body":"Hi,\n\nOn Wed, Nov 5, 2008 at 6:41 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> You can delete the bogus branches (using git branch -rd or git\n> update-ref -d), but I'm not sure if you can reset git svn's state info:\n> You may try messing with .git/svn/.metadata.\n\nI'll try it, if not I'll recreate the repo from scratch ;)) Thanks for the tips!\n\n> I tried the approach I suggested in the last post for real, and things\n> seem to work. Only gotcha is I don't know whether django folks will\n> stick with putting branches under {releases,features}, that would create\n> problems\n\nThey say they won't put more folders in branches/ ;))\n\nThanks again for the tips, that will solve lots of trouble. Thanks!\n\nCheers.\nMarc\n\n-- \nhttp://www.marcfargas.com - will be finished someday.\n"}]}