From: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: git-svn: rewrite git-svn-id to something else on cherry-picking
Date: Thu, 10 Oct 2013 09:37:37 +0200 [thread overview]
Message-ID: <CAA01CsrsmxCrpDpQGLNh1WvmWwfEntJ1oJ8yYfze=SMCwZN8ww@mail.gmail.com> (raw)
Hi,
maybe some people will find this useful:
based on an old mail from Daniele Segato (to be found here:
http://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)
I made following .gitconfig entry:
[alias]
cherry-pick-svn = !GIT_EDITOR='sed -i
\"s/git-svn-id:.*\\/\\(.*\\)@\\(.*\\) .*/Merged from \\1: r\\2/\"' git
cherry-pick -e
This allows me to cherry-pick changes from some branch and rewrite e.g.
git-svn-id: http://server/repo/branch_name@43860
7b134e4a-3e3f-4a80-a66b-82fcf99633eb
to
Merged from branch_name: r43860
(Why: I'm using one old svn server which does not support mergeinfo. I
had a feature branch and I needed to "merge" it back to trunk. But
without mergeinfo it's no fun, so I tried using git-svn and
cherry-pick. This worked but commits had those ' git-svn-id:
http://branch_url@41986 some-hash-id' and I was not sure if dcommit
would work correctly (would it strip them and commit to trunk and not
to the branch?) and even if it would, there would be no information
that the commit was "merged" from the branch.)
--
Piotr Krukowiecki
reply other threads:[~2013-10-10 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA01CsrsmxCrpDpQGLNh1WvmWwfEntJ1oJ8yYfze=SMCwZN8ww@mail.gmail.com' \
--to=piotr.krukowiecki@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).