tags:

views:

241

answers:

1

Converting a repository from Git to Mercurial results in a load of spurious "committer:" lines in each log message. I can't figure out a way to not generate these. If I convert a SVN repository, these lines aren't added. It seems to be a git thing only.

This is easy to test. Here's how on Linux:

mkdir repo && cd repo
git init
echo hello > foo.txt
git add foo.txt
git commit -m"Initial import"
cd ..
hg convert repo
cd repo-hg
hg log -v

The log will say something like this:

changeset:   0:077135a87f99
tag:         tip
user:        Your Name <[email protected]>
date:        Mon Jan 01 12:04:46 2001 
files:       foo.txt
description:
Initial import

committer: Your Name <[email protected]>

So, how can I avoid that redundant "committer:" line?

+4  A: 

It is a git-specific thing and hg convert is adding this because hg has no way to represent this information. In git, the committer and author don't have to be the same person (really great feature of git, IMO).

There doesn't seem to be any specific documentation on this, and it's not a configurable feature. I'm sure they'd accept a patch happily. :)

Dustin
You're right. What threw me was "hg view" showing different Committer and Author fields as well as "committer:" in the log. Testing with "hg commit -u" showed that hgk actually parses the log for the missing "committer" metadata, later I just looked at hgk's source and this is actually what it does. The bug is that if committer and author are the same, the committer: line probably shouldn't be added.
rq
And here's the patch http://article.gmane.org/gmane.comp.version-control.mercurial.devel/22152
rq