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

Fixing SVN import merges

From
fREW Schmidt <frioux@gmail.com>
Date
Oct 26, 2010, 19:50 UTC
Message-ID
<AANLkTikO3fnBapx_=H3172bL+J9ux-LC3f5Bdi1R9-sq@mail.gmail.com>
Hey guys,

We are doing a fairly extensive import from an svn (with svk sometimes) repo, and I wanted to fix the merge messages that svk generates.

I thought I could use filter-branch with --msg-filter and do something along the lines of:

 #!/usr/bin/perl
 my @parents = split / /, `git log -1 --pretty=%P HEAD`;
 print '', <> if @parents == 1;
 my @names = map `git name-rev --name-only $_`, @parents;
 print "Merged '$names[0]' into '$names[1]'";

But that doesn't seem to work. I think I need to tell it to do a no-op tree-filter for the above to work.

Also, it seems like git sometimes includes branches being merged into, sometimes doesn't. Sometimes quotes branch names, and sometimes doesn't. Anyone know what the rules are there?

Lastly, any other comments are very welcome.

-- fREW Schmidt http://blog.afoolishmanifesto.com

Message 1 of 1 in “Fixing SVN import merges”
  1. fREW SchmidtOct 26, 2010

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.