threads / discuss / 25553

Fixing SVN import merges

Subject: Fixing SVN import merges

## tl;dr

One message between Oct 26, 2010 and Oct 26, 2010.

replies: 0people: 1as markdown or json

fREW Schmidt· Oct 26, 2010, 19:50 UTC · lore
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

← back to recent threads