Re: [PATCH] Let git-svnimport clean up SVK commit messages.
From: Jeffrey C. Ollie <hidden>
Date: 2016-06-15 22:43:17
On Thu, 2007-06-21 at 10:14 -0400, Dave O'Neill wrote:
On Wed, Jun 20, 2007 at 08:19:33PM -0700, Steven Grimm wrote:quoted
Any chance of applying this to git-svn instead? There has been talk of deprecating git-svnimport since git-svn now does everything git-svnimport does, and more. (If you believe that's not the case, please describe what you're doing with git-svnimport that you can't do with git-svn.)Sure, I can probably apply it to git-svn as well, but based on the testing I've done, git-svnimport still works better for what I'm doing. I'm trying to do a straight conversion from SVN to git, so we can do away with our Subversion repositories, so I won't need the bidirectional support of git-svn. If git-svn had a --one-way option that could - know that I'm converting, and import my SVN tags and branches to local tags and heads rather than remotes
This quickie Python script should convert the "tag branches" to regular
Git tags:
import os
refs = os.popen('git-for-each-ref --format="%(objectname)%00%(refname)%00" refs/remotes/tags')
for line in refs:
[sha, ref] = line.split('\0')[:2]
os.system('git tag %s %s' % (ref[18:], sha))
- turn off the git-svn-id: tags in the commit
git svn fetch --no-metadata
- avoid preserving a .git/svn/ directory (a git-svn conversion was 50%
larger than one from git-svnimport because of this)Once you are done importing, you can delete that directory.
- convert svn:ignore attrs to .gitignore (like the -I option of
git-svnignore)git svn show-ignore
then I wouldn't need git-svnimport. Alternatively, if there's some way to postprocess my clone to do all of the above, that would probably be good enough.
Attachments
- signature.asc [application/pgp-signature] 189 bytes