# Fixing SVN import merges

1 messages from 2010-10-26 to 2010-10-26. Participants: fREW Schmidt.
Thread: https://gitlist.dev/t/25553

## fREW Schmidt, 2010-10-26 19:50

Subject: Fixing SVN import merges
Message-ID: <AANLkTikO3fnBapx_=H3172bL+J9ux-LC3f5Bdi1R9-sq@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikO3fnBapx_%3DH3172bL%2BJ9ux-LC3f5Bdi1R9-sq%40mail.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

```
