threads / discuss / 11719

CVS import: Changing/cleaning authors and committers

Subject: CVS import: Changing/cleaning authors and committers

## tl;dr

6 messages between Jan 24, 2008 and Jan 24, 2008.

replies: 5people: 3as markdown or json

Robert Haines· Jan 24, 2008, 15:12 UTC · lore
Hi all,

I am very new to git, but already impressed! I am in the process of converting my old CVS repos into git. So far so good, it all works with 'git cvsimport' but I was wondering about the author and committer names. All mine have come out as the username of the person who committed the change into CVS:

author xxcguxx <xxcguxx> committer xxcguxx <xxcguxx>

I was wondering if it would be able to go through and change all that to:

author Name <email@address> etc

Is this something that can be retrospectively done? Is it something that can be done during cvsimport? Is it even doable?

Any suggestions gratefully received!

Best wishes, Rob

-- Robert Haines

Research Associate, RealityGrid Tel. : +44 (0)161 275 6067 Research Computing Services Fax. : +44 (0)161 275 0637 Kilburn Building Email: rhaines@manchester.ac.uk University of Manchester Web : www.realitygrid.org Manchester, M13 9PL, UK : www.rcs.manchester.ac.uk

David Kastrup· Jan 24, 2008, 15:42 UTC · re: Robert Haines · lore

Re: CVS import: Changing/cleaning authors and committers

Robert Haines <rhaines@manchester.ac.uk> writes:
Show 21 quoted lines
> Hi all,
>
> I am very new to git, but already impressed! I am in the process of
> converting my old CVS repos into git. So far so good, it all works
> with 'git cvsimport' but I was wondering about the author and
> committer names. All mine have come out as the username of the person
> who committed the change into CVS:
>
> author xxcguxx <xxcguxx>
> committer xxcguxx <xxcguxx>
>
> I was wondering if it would be able to go through and change all that
> to:
>
> author Name <email@address>
> etc
>
> Is this something that can be retrospectively done? Is it something
> that can be done during cvsimport? Is it even doable?
>
> Any suggestions gratefully received!
If everything else fails, read the documentation.
man git-cvsimport
[...]
	-A <author-conv-file>
	    CVS by default uses the Unix username when writing its
	    commit logs. Using this option and an author-conv-file
	    in this format
[...]
-- 
David Kastrup
Robert Haines· Jan 24, 2008, 15:55 UTC · re: David Kastrup · lore

Re: CVS import: Changing/cleaning authors and committers

>> Any suggestions gratefully received!
>
> If everything else fails, read the documentation.

Oh man, I thought I had... Sorry for wasting your time. Boy is my face red...

Cheers, Rob

David Kastrup· Jan 24, 2008, 16:02 UTC · re: Robert Haines · lore

Re: CVS import: Changing/cleaning authors and committers

Robert Haines <rhaines@manchester.ac.uk> writes:
Show 5 quoted lines
>>> Any suggestions gratefully received!
>>
>> If everything else fails, read the documentation.
>
> Oh man [...]
Yes, that.
-- 
David Kastrup
Jeff King· Jan 24, 2008, 16:37 UTC · re: Robert Haines · lore

Re: CVS import: Changing/cleaning authors and committers

On Thu, Jan 24, 2008 at 03:12:08PM +0000, Robert Haines wrote:
Show 7 quoted lines
> I was wondering if it would be able to go through and change all that to:
>
> author Name <email@address>
> etc
>
> Is this something that can be retrospectively done? Is it something that 
> can be done during cvsimport? Is it even doable?

David already answered the second question, and it is probably simpler to just redo the import with -A unless there is some complication with that (like you no longer have access to the CVS files).

However, to answer your first question: it can be fixed after the fact by rewriting history within the git repository; see git-filter-branch.

-Peff
Robert Haines· Jan 24, 2008, 17:12 UTC · re: Jeff King · lore

Re: CVS import: Changing/cleaning authors and committers

On 24 Jan 2008, at 16:37, Jeff King wrote:
Show 18 quoted lines
> On Thu, Jan 24, 2008 at 03:12:08PM +0000, Robert Haines wrote:
>
>> I was wondering if it would be able to go through and change all  
>> that to:
>>
>> author Name <email@address>
>> etc
>>
>> Is this something that can be retrospectively done? Is it  
>> something that
>> can be done during cvsimport? Is it even doable?
>
> David already answered the second question, and it is probably simpler
> to just redo the import with -A unless there is some complication with
> that (like you no longer have access to the CVS files).
>
> However, to answer your first question: it can be fixed after the fact
> by rewriting history within the git repository; see git-filter-branch.

So ideally I would have spotted the -A flag originally! I have had something of an information overload with git, gitweb and so on recently.

I decided to re-import with the -A flag as there is (much) less chance of me mucking it up!

Thanks, Rob

← back to recent threads