git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Let git-svnimport clean up SVK commit messages.

From
Jeffrey C. Ollie <jeff@ocjtech.us>
Date
Jun 21, 2007, 15:00 UTC
Message-ID
<1182438000.4031.11.camel@lt21223.campus.dmacc.edu>
In-Reply-To
<20070621141415.GA21065@magnesium.roaringpenguin.com>
On Thu, 2007-06-21 at 10:14 -0400, Dave O'Neill wrote:
Show 17 quoted lines
> On Wed, Jun 20, 2007 at 08:19:33PM -0700, Steven Grimm wrote:
> 
> > 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.
Previous: Dave O'NeillNext: Dave O'Neill
Message 4 of 8 in “Let git-svnimport clean up SVK commit messages.”
  1. Let git-svnimport clean up SVK commit messages.Dave O'Neill, Jun 21, 2007
  2. Steven GrimmJun 21, 2007
  3. Dave O'NeillJun 21, 2007
  4. Jeffrey C. OllieJun 21, 2007
  5. Dave O'NeillJun 21, 2007
  6. Sam VilainJun 21, 2007
  7. Dave O'NeillJun 21, 2007
  8. Let git-svnimport and git-svn clean up SVK commit messagesDave O'Neill, Jun 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.