{"thread":{"id":"35095","subject":"git-svn: rewrite git-svn-id to something else on cherry-picking","startedAt":"2013-10-10T07:37:37Z","lastAt":"2013-10-10T07:37:37Z","messageCount":1,"participants":["Piotr Krukowiecki"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"228686","messageId":"CAA01CsrsmxCrpDpQGLNh1WvmWwfEntJ1oJ8yYfze=SMCwZN8ww@mail.gmail.com","threadId":"35095","inReplyTo":null,"subject":"git-svn: rewrite git-svn-id to something else on cherry-picking","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2013-10-10T07:37:37Z","receivedAt":"2013-10-10T07:37:37Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"Hi,\n\nmaybe some people will find this useful:\n\nbased on an old mail from Daniele Segato (to be found here:\nhttp://git.661346.n2.nabble.com/cherry-pick-from-a-branch-to-another-with-git-svn-automatically-stripping-git-svn-id-from-commit-mese-tt4548700.html#none)\nI made following .gitconfig entry:\n\n[alias]\n    cherry-pick-svn =  !GIT_EDITOR='sed -i\n\\\"s/git-svn-id:.*\\\\/\\\\(.*\\\\)@\\\\(.*\\\\) .*/Merged from \\\\1: r\\\\2/\\\"' git\ncherry-pick -e\n\nThis allows me to cherry-pick changes from some branch and rewrite e.g.\n  git-svn-id: http://server/repo/branch_name@43860\n7b134e4a-3e3f-4a80-a66b-82fcf99633eb\nto\n  Merged from branch_name: r43860\n\n\n(Why: I'm using one old svn server which does not support mergeinfo. I\nhad a feature branch and I needed to \"merge\" it back to trunk. But\nwithout mergeinfo it's no fun, so I tried using git-svn and\ncherry-pick. This worked but commits had those ' git-svn-id:\nhttp://branch_url@41986 some-hash-id' and I was not sure if dcommit\nwould work correctly (would it strip them and commit to trunk and not\nto the branch?) and even if it would, there would be no information\nthat the commit was \"merged\" from the branch.)\n\n\n-- \nPiotr Krukowiecki\n"}]}