{"thread":{"id":"25142","subject":"[PATCH (girocco) 0/3] Fix svn mirroring of branches + more...","startedAt":"2010-09-18T09:58:51Z","lastAt":"2010-09-25T08:01:18Z","messageCount":5,"participants":["Kirill Smelkov"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"150939","messageId":"cover.1284803429.git.kirr@landau.phys.spbu.ru","threadId":"25142","inReplyTo":null,"subject":"[PATCH (girocco) 0/3] Fix svn mirroring of branches + more...","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-09-18T09:58:51Z","receivedAt":"2010-09-18T09:58:51Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"Petr, rorcz-admins,\n\nToday I've spot that rorcz does not propagate svn branches to git namespace and\ntried to fix it.\n\nPlease apply and thanks,\nKirill\n\nKirill Smelkov (3):\n  taskd/clone: Store git-svn refs under svn-origin remote\n  taskd/clone: ask git-svn to store branches under svn-origin/heads/*\n    instead of svn-origin/*\n  Revert \"Finalized fix, we can't git fetch any longer.\"\n\n jobd/update.sh |    1 +\n taskd/clone.sh |   12 ++++++++----\n 2 files changed, 9 insertions(+), 4 deletions(-)\n\n-- \n1.7.3.rc2.1.g63647\n"},{"id":"150940","messageId":"4ade10555225aa1bfeb8f3a3ba89580d1aeae99c.1284803429.git.kirr@landau.phys.spbu.ru","threadId":"25142","inReplyTo":"cover.1284803429.git.kirr@landau.phys.spbu.ru","subject":"[PATCH (girocco) 1/3] taskd/clone: Store git-svn refs under svn-origin remote","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-09-18T09:58:52Z","receivedAt":"2010-09-18T09:58:52Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"Previously git-svn stored everything right under refs/remotes/ , and now\nI'm putting svn-mirrored refs under refs/remotes/svn-origin/ .\n\nThis makes sense, since it helps debugging svn-mirroring problems - e.g.\nat present we don't forward to visible git namespace svn branches at\nall.\n\nCc: Andrew Steinborn <g33kdyoo@gmail.com>\nCc: Miklos Vajna <vmiklos@frugalware.org>\n---\n taskd/clone.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/taskd/clone.sh b/taskd/clone.sh\nindex 9a6409c..8d56e1e 100755\n--- a/taskd/clone.sh\n+++ b/taskd/clone.sh\n@@ -25,13 +25,13 @@ case \"$url\" in\n \tsvn://* | svn+http://* | svn+https://*)\n \t\t# we just remote svn+ here, so svn+http://... becomes http://...\n \t\tsvnurl=\"${url#svn+}\"\n-\t\tGIT_DIR=. git svn init -s \"$svnurl\"\n+\t\tGIT_DIR=. git svn init -s --prefix=svn-origin/ \"$svnurl\"\n \t\tGIT_DIR=. git svn fetch\n \t\t# Neat Trick suggested by Miklos Vajna\n \t\tGIT_DIR=. git config remote.origin.url .\n-\t\tGIT_DIR=. git config remote.origin.fetch '+refs/remotes/heads/*:refs/heads/*'\n-\t\tGIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/trunk:refs/heads/master'\n-\t\tGIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/tags/*:refs/tags/*'\n+\t\tGIT_DIR=. git config remote.origin.fetch '+refs/remotes/svn-origin/heads/*:refs/heads/*'\n+\t\tGIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/svn-origin/trunk:refs/heads/master'\n+\t\tGIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/svn-origin/tags/*:refs/tags/*'\n \t\tGIT_DIR=. git fetch\n \t\t;;\n       \tdarcs://*)\n-- \n1.7.3.rc2.1.g63647\n"},{"id":"150941","messageId":"9b21791c9138823862157c5889181543ac4f1f2a.1284803429.git.kirr@landau.phys.spbu.ru","threadId":"25142","inReplyTo":"cover.1284803429.git.kirr@landau.phys.spbu.ru","subject":"[PATCH (girocco) 2/3] taskd/clone: ask git-svn to store branches under svn-origin/heads/* instead of svn-origin/*","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-09-18T09:58:53Z","receivedAt":"2010-09-18T09:58:53Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"The trick originally suggested by Mikls Vajna does the following:\n\n    refs/remotes/svn-origin/heads/*     ->  refs/heads/*\n    refs/remotes/svn-origin/trunk       ->  refs/heads/master\n    refs/remotes/svn-origin/tags/*      ->  refs/tags/*\n\nThe problem is git-svn now stores svn branches under\nrefs/remotes/svn-origin/* (not refs/remotes/svn-origin/heads/* as we\nused to expect), and so the first mapping does nothing, and we end up\nwithout svn branches in refs/heads/ namespace.\n\nSo, to avoid the problem let's ask git-svn to put svn branches under\nsvn-origin/heads/* -- then our mapping will work as expected, and it\nwill fix girocco problem of not propagating svn branches (except trunk)\nto git refs/heads/ namespace.\n\nNote: we can't write ``+refs/remotes/svn-origin/*:refs/heads/*'' in the\nmapping instead, because then it will recursively put everything from\nunder svn-origin/ into refs/heads/ , at least including tags/ .\n\n( Eric, at least it seems a bit unflexible for storing svn branches right under\n  $prefix/ -- as you can see for automated git mirroring of svn repos, I\n  had to tweak git config by hand... )\n\nCc: Andrew Steinborn <g33kdyoo@gmail.com>\nCc: Miklos Vajna <vmiklos@frugalware.org>\nCc: Eric Wong <normalperson@yhbt.net>\n---\n taskd/clone.sh |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/taskd/clone.sh b/taskd/clone.sh\nindex 8d56e1e..12363e5 100755\n--- a/taskd/clone.sh\n+++ b/taskd/clone.sh\n@@ -26,6 +26,10 @@ case \"$url\" in\n \t\t# we just remote svn+ here, so svn+http://... becomes http://...\n \t\tsvnurl=\"${url#svn+}\"\n \t\tGIT_DIR=. git svn init -s --prefix=svn-origin/ \"$svnurl\"\n+\t\t# ask git-svn to store branches under svn-origin/heads/* instead of svn-origin/*\n+\t\tGIT_DIR=. git config svn-remote.svn.branches\t\\\n+\t\t\t\"$(git config --get svn-remote.svn.branches |\t\\\n+\t\t\t   sed 's|:refs/remotes/svn-origin/\\*$|:refs/remotes/svn-origin/heads/*|')\"\n \t\tGIT_DIR=. git svn fetch\n \t\t# Neat Trick suggested by Miklos Vajna\n \t\tGIT_DIR=. git config remote.origin.url .\n-- \n1.7.3.rc2.1.g63647\n"},{"id":"150942","messageId":"e1ebe5d7de07152f1e7b6c997658dedc094af3c4.1284803429.git.kirr@landau.phys.spbu.ru","threadId":"25142","inReplyTo":"cover.1284803429.git.kirr@landau.phys.spbu.ru","subject":"[PATCH (girocco) 3/3] Revert \"Finalized fix, we can't git fetch any longer.\"","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-09-18T09:58:54Z","receivedAt":"2010-09-18T09:58:54Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"This reverts commit 1b442bd3713465e05e7e1a2c46d2439508dd2d4e.\n\nAndrew forgot to revert this when he was reverting his experiments\nin 1cb526 (Readded the trick.) .\n\nAndrew, please be careful not to introduce regressions - without this\nfetch, svn mirrors won't update their git refs, and so would become\nstale.\n\nCc: Andrew Steinborn <g33kdyoo@gmail.com>\n---\n jobd/update.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/jobd/update.sh b/jobd/update.sh\nindex ea94306..36f7531 100755\n--- a/jobd/update.sh\n+++ b/jobd/update.sh\n@@ -40,6 +40,7 @@ bang git for-each-ref --format '%(refname)\t%(objectname)' >.refs-before\n case \"$url\" in\n \tsvn://* | svn+http://* | svn+https://*)\n \t\tGIT_DIR=. bang git svn fetch\n+\t\tGIT_DIR=. bang git fetch\n \t\t;;\n \tdarcs://*)\n \t\thttpurl=\"${url/darcs:\\/\\//http://}\"\n-- \n1.7.3.rc2.1.g63647\n"},{"id":"151621","messageId":"20100925080117.GA3603@roro3.zxlink","threadId":"25142","inReplyTo":"cover.1284803429.git.kirr@landau.phys.spbu.ru","subject":"Re: [PATCH (girocco) 0/3] Fix svn mirroring of branches + more...","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-09-25T08:01:18Z","receivedAt":"2010-09-25T08:01:18Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"+ pasky@suse.cz\n\nOn Sat, Sep 18, 2010 at 01:58:51PM +0400, Kirill Smelkov wrote:\n> Petr, rorcz-admins,\n> \n> Today I've spot that rorcz does not propagate svn branches to git namespace and\n> tried to fix it.\n> \n> Please apply and thanks,\n> Kirill\n>\n>\n> Kirill Smelkov (3):\n>   taskd/clone: Store git-svn refs under svn-origin remote\n>   taskd/clone: ask git-svn to store branches under svn-origin/heads/*\n>     instead of svn-origin/*\n>   Revert \"Finalized fix, we can't git fetch any longer.\"\n> \n>  jobd/update.sh |    1 +\n>  taskd/clone.sh |   12 ++++++++----\n>  2 files changed, 9 insertions(+), 4 deletions(-)\n\n\nSilence... But it fixes regression and recent breakage... Anyone?!!!\n"}]}