{"thread":{"id":"1742","subject":"[PATCH] Added an option to cvsimport to specify email domain","startedAt":"2005-09-07T08:00:02Z","lastAt":"2005-09-30T13:54:45Z","messageCount":10,"participants":["David Kågedal","Junio C Hamano","Petr Baudis","Alexey Nezhdanov","David Mansfield"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"8162","messageId":"u5tzmqp8fzx.fsf@lysator.liu.se","threadId":"1742","inReplyTo":null,"subject":"[PATCH] Added an option to cvsimport to specify email domain","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2005-09-07T08:00:02Z","receivedAt":"2005-09-07T08:00:02Z","isPatch":true,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"The authorship info in commits created by git-cvsimport-script\nonly contains the username of the CVS committer.  This patch\nadds a flag -e <domain> to git-cvsimport-script that makes it\npossible to specify an email domain that is added to all email\naddresses in the commit \"author\" and \"committer\" fields.\n\n---\nI have stopped using cvsimport, because cvsps seems to produce bad\noutput on the repository I'm using it with, but I had already prepared\nthis patch.\n\n Documentation/git-cvsimport-script.txt |    8 +++++++-\n git-cvsimport-script                   |   18 +++++++++++++-----\n 2 files changed, 20 insertions(+), 6 deletions(-)\n\ncabbc2b5cae2dcd892d02a3c679698cdfb3b9de5\ndiff --git a/Documentation/git-cvsimport-script.txt b/Documentation/git-cvsimport-script.txt\n--- a/Documentation/git-cvsimport-script.txt\n+++ b/Documentation/git-cvsimport-script.txt\n@@ -12,7 +12,9 @@ SYNOPSIS\n 'git-cvsimport-script' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]\n \t\t\t[ -d <CVSROOT> ] [ -p <options-for-cvsps> ]\n \t\t\t[ -C <GIT_repository> ] [ -i ] [ -k ]\n-\t\t\t[ -s <subst> ] [ -m ] [ -M regex ] [ <CVS_module> ]\n+\t\t\t[ -s <subst> ] [ -m ] [ -M regex ]\n+\t\t\t[ -e <domain> ]\n+\t\t\t[ <CVS_module> ]\n \n \n DESCRIPTION\n@@ -86,6 +88,10 @@ OPTIONS\n -s <subst>::\n \tSubstitute the character \"/\" in branch names with <subst>\n \n+-e <domain>::\n+        Append '@<domain>' to the author name to use as the email\n+        address in commit objects.\n+\n OUTPUT\n ------\n If '-v' is specified, the script reports what it is doing.\ndiff --git a/git-cvsimport-script b/git-cvsimport-script\n--- a/git-cvsimport-script\n+++ b/git-cvsimport-script\n@@ -29,19 +29,20 @@ use IPC::Open2;\n $SIG{'PIPE'}=\"IGNORE\";\n $ENV{'TZ'}=\"UTC\";\n \n-our($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_s,$opt_m,$opt_M);\n+our($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_s,$opt_m,$opt_M,$opt_e);\n \n sub usage() {\n \tprint STDERR <<END;\n Usage: ${\\basename $0}     # fetch/update GIT from CVS\n        [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT]\n        [-p opts-for-cvsps] [-C GIT_repository] [-z fuzz]\n-       [-i] [-k] [-u] [-s subst] [-m] [-M regex] [CVS_module]\n+       [-i] [-k] [-u] [-s subst] [-m] [-M regex] [ -e email-domain ]\n+       [CVS_module]\n END\n \texit(1);\n }\n \n-getopts(\"hivmkuo:d:p:C:z:s:M:\") or usage();\n+getopts(\"hivmkuo:d:p:C:z:s:M:e:\") or usage();\n usage if $opt_h;\n \n @ARGV <= 1 or usage();\n@@ -85,6 +86,13 @@ if ($opt_M) {\n \tpush (@mergerx, qr/$opt_M/);\n }\n \n+our $email_suffix;\n+if ($opt_e) {\n+    $email_suffix = \"@\".\"$opt_e\";\n+} else {\n+    $email_suffix = \"\";\n+}\n+\n select(STDERR); $|=1; select(STDOUT);\n \n \n@@ -592,10 +600,10 @@ my $commit = sub {\n \n \t\texec(\"env\",\n \t\t\t\"GIT_AUTHOR_NAME=$author\",\n-\t\t\t\"GIT_AUTHOR_EMAIL=$author\",\n+\t\t\t\"GIT_AUTHOR_EMAIL=$author$email_suffix\",\n \t\t\t\"GIT_AUTHOR_DATE=\".strftime(\"+0000 %Y-%m-%d %H:%M:%S\",gmtime($date)),\n \t\t\t\"GIT_COMMITTER_NAME=$author\",\n-\t\t\t\"GIT_COMMITTER_EMAIL=$author\",\n+\t\t\t\"GIT_COMMITTER_EMAIL=$author$email_suffix\",\n \t\t\t\"GIT_COMMITTER_DATE=\".strftime(\"+0000 %Y-%m-%d %H:%M:%S\",gmtime($date)),\n \t\t\t\"git-commit-tree\", $tree,@par);\n \t\tdie \"Cannot exec git-commit-tree: $!\\n\";\n\n-- \nDavid Kågedal\n"},{"id":"8169","messageId":"7vhdcw661g.fsf@assigned-by-dhcp.cox.net","threadId":"1742","inReplyTo":"u5tzmqp8fzx.fsf@lysator.liu.se","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-07T19:18:03Z","receivedAt":"2005-09-07T19:18:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Kågedal <davidk@lysator.liu.se> writes:\n\n> The authorship info in commits created by git-cvsimport-script\n> only contains the username of the CVS committer.  This patch\n> adds a flag -e <domain> to git-cvsimport-script that makes it\n> possible to specify an email domain that is added to all email\n> addresses in the commit \"author\" and \"committer\" fields.\n>\n> ---\n> I have stopped using cvsimport, because cvsps seems to produce bad\n> output on the repository I'm using it with, but I had already prepared\n> this patch.\n\nHmph.  One reason the original implementation did not do this is\nbecause Linus and other people wanted to have a repeatability,\nso making this an optional thing is good, but if we go this\nroute, I think if it would be nicer to have a --author-map\noption that lets you feed a list of:\n\n    <author> ==> \"A U Thor <author@author.dom>\"\n\nmappings, instead of a single -e, which essentially does not add\nmuch information to the result.\n\nI take that your oob comment indicates that you do not have much\nincentive/inclination to further hack on this, so I am not\nasking you to do the above even if you find my suggestion\nworthwhile.\n"},{"id":"8552","messageId":"20050914193457.GE2936@pasky.or.cz","threadId":"1742","inReplyTo":"7vhdcw661g.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-09-14T19:34:57Z","receivedAt":"2005-09-14T19:34:57Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> \n> > The authorship info in commits created by git-cvsimport-script\n> > only contains the username of the CVS committer.  This patch\n> > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > possible to specify an email domain that is added to all email\n> > addresses in the commit \"author\" and \"committer\" fields.\n> >\n> > ---\n> > I have stopped using cvsimport, because cvsps seems to produce bad\n> > output on the repository I'm using it with, but I had already prepared\n> > this patch.\n> \n> Hmph.  One reason the original implementation did not do this is\n> because Linus and other people wanted to have a repeatability,\n> so making this an optional thing is good, but if we go this\n> route, I think if it would be nicer to have a --author-map\n> option that lets you feed a list of:\n> \n>     <author> ==> \"A U Thor <author@author.dom>\"\n> \n> mappings, instead of a single -e, which essentially does not add\n> much information to the result.\n> \n> I take that your oob comment indicates that you do not have much\n> incentive/inclination to further hack on this, so I am not\n> asking you to do the above even if you find my suggestion\n> worthwhile.\n\nVarious tools use CVSROOT/users to map usernames to realname <email>.\nI actually wanted to send a patch, looked at the cvsimport script and\ngot totally scared away (at least for now)... ;-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"},{"id":"9359","messageId":"200509270834.55486.snake@penza-gsm.ru","threadId":"1742","inReplyTo":"20050914193457.GE2936@pasky.or.cz","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Alexey Nezhdanov","fromEmail":"snake@penza-gsm.ru","sentAt":"2005-09-27T04:34:55Z","receivedAt":"2005-09-27T04:34:55Z","isPatch":true,"sender":{"key":"snake@penza-gsm.ru","avatar":null},"body":"(Re-post. Sorry for any inconvenience.)\nOn September 14, 2005 23:34 Petr Baudis wrote:\n> Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\n> where Junio C Hamano <junkio@cox.net> told me that...\n>\n> > David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> > > The authorship info in commits created by git-cvsimport-script\n> > > only contains the username of the CVS committer.  This patch\n> > > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > > possible to specify an email domain that is added to all email\n> > > addresses in the commit \"author\" and \"committer\" fields.\n> > >\n> > > ---\n> > > I have stopped using cvsimport, because cvsps seems to produce bad\n> > > output on the repository I'm using it with, but I had already prepared\n> > > this patch.\n> >\n> > Hmph.  One reason the original implementation did not do this is\n> > because Linus and other people wanted to have a repeatability,\n> > so making this an optional thing is good, but if we go this\n> > route, I think if it would be nicer to have a --author-map\n> > option that lets you feed a list of:\n> >\n> >     <author> ==> \"A U Thor <author@author.dom>\"\n> >\n> > mappings, instead of a single -e, which essentially does not add\n> > much information to the result.\n> >\n> > I take that your oob comment indicates that you do not have much\n> > incentive/inclination to further hack on this, so I am not\n> > asking you to do the above even if you find my suggestion\n> > worthwhile.\n>\n> Various tools use CVSROOT/users to map usernames to realname <email>.\n> I actually wanted to send a patch, looked at the cvsimport script and\n> got totally scared away (at least for now)... ;-)\ngit uses cvsps output to determine authorship. Do you think if this problem \nshould be solved on cvsps side? It should be relatively easy IMHO.\nDavid, can you add another key to output CVSROOT/users mapping result instead \nof usernames if available?\n-- \nRespectfully\nAlexey Nezhdanov\n"},{"id":"9386","messageId":"1127825656.30421.15.camel@gandalf.cobite.com","threadId":"1742","inReplyTo":"200509270834.55486.snake@penza-gsm.ru","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"David Mansfield","fromEmail":"david@cobite.com","sentAt":"2005-09-27T12:54:16Z","receivedAt":"2005-09-27T12:54:16Z","isPatch":true,"sender":{"key":"david@cobite.com","avatar":null},"body":"On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:\n> (Re-post. Sorry for any inconvenience.)\n> On September 14, 2005 23:34 Petr Baudis wrote:\n> > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\n> > where Junio C Hamano <junkio@cox.net> told me that...\n> >\n> > > David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> > > > The authorship info in commits created by git-cvsimport-script\n> > > > only contains the username of the CVS committer.  This patch\n> > > > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > > > possible to specify an email domain that is added to all email\n> > > > addresses in the commit \"author\" and \"committer\" fields.\n> > > >\n> > > > ---\n> > > > I have stopped using cvsimport, because cvsps seems to produce bad\n> > > > output on the repository I'm using it with, but I had already prepared\n> > > > this patch.\n> > >\n> > > Hmph.  One reason the original implementation did not do this is\n> > > because Linus and other people wanted to have a repeatability,\n> > > so making this an optional thing is good, but if we go this\n> > > route, I think if it would be nicer to have a --author-map\n> > > option that lets you feed a list of:\n> > >\n> > >     <author> ==> \"A U Thor <author@author.dom>\"\n> > >\n> > > mappings, instead of a single -e, which essentially does not add\n> > > much information to the result.\n> > >\n> > > I take that your oob comment indicates that you do not have much\n> > > incentive/inclination to further hack on this, so I am not\n> > > asking you to do the above even if you find my suggestion\n> > > worthwhile.\n> >\n> > Various tools use CVSROOT/users to map usernames to realname <email>.\n> > I actually wanted to send a patch, looked at the cvsimport script and\n> > got totally scared away (at least for now)... ;-)\n> git uses cvsps output to determine authorship. Do you think if this problem \n> should be solved on cvsps side? It should be relatively easy IMHO.\n> David, can you add another key to output CVSROOT/users mapping result instead \n> of usernames if available?\n\nI apologize that I probably won't have time to look at this right now...\n\nDavid\n"},{"id":"9475","messageId":"200509291426.27232.snake@penza-gsm.ru","threadId":"1742","inReplyTo":"200509270834.55486.snake@penza-gsm.ru","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Alexey Nezhdanov","fromEmail":"snake@penza-gsm.ru","sentAt":"2005-09-29T10:26:26Z","receivedAt":"2005-09-29T10:26:26Z","isPatch":true,"sender":{"key":"snake@penza-gsm.ru","avatar":null},"body":"On Tuesday, 27 September 2005 08:34 Alexey Nezhdanov wrote:\n\nClarification: I'm currently working on patch for cvsps that will allow import \nproper usernames with emails. It is already working now but have one glitch \nthat I'd like to remove prior to publishing.\n\n> On September 14, 2005 23:34 Petr Baudis wrote:\n> > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\n> > where Junio C Hamano <junkio@cox.net> told me that...\n> >\n> > > David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> > > > The authorship info in commits created by git-cvsimport-script\n> > > > only contains the username of the CVS committer.  This patch\n> > > > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > > > possible to specify an email domain that is added to all email\n> > > > addresses in the commit \"author\" and \"committer\" fields.\n> > > >\n> > > > ---\n> > > > I have stopped using cvsimport, because cvsps seems to produce bad\n> > > > output on the repository I'm using it with, but I had already\n> > > > prepared this patch.\n> > >\n> > > Hmph.  One reason the original implementation did not do this is\n> > > because Linus and other people wanted to have a repeatability,\n> > > so making this an optional thing is good, but if we go this\n> > > route, I think if it would be nicer to have a --author-map\n> > > option that lets you feed a list of:\n> > >\n> > >     <author> ==> \"A U Thor <author@author.dom>\"\n> > >\n> > > mappings, instead of a single -e, which essentially does not add\n> > > much information to the result.\n> > >\n> > > I take that your oob comment indicates that you do not have much\n> > > incentive/inclination to further hack on this, so I am not\n> > > asking you to do the above even if you find my suggestion\n> > > worthwhile.\n> >\n> > Various tools use CVSROOT/users to map usernames to realname <email>.\n> > I actually wanted to send a patch, looked at the cvsimport script and\n> > got totally scared away (at least for now)... ;-)\n>\n> git uses cvsps output to determine authorship. Do you think if this problem\n> should be solved on cvsps side? It should be relatively easy IMHO.\n> David, can you add another key to output CVSROOT/users mapping result\n> instead of usernames if available?\n\n-- \nRespectfully\nAlexey Nezhdanov\n"},{"id":"9540","messageId":"200509301219.42087.snake@penza-gsm.ru","threadId":"1742","inReplyTo":"1127825656.30421.15.camel@gandalf.cobite.com","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Alexey Nezhdanov","fromEmail":"snake@penza-gsm.ru","sentAt":"2005-09-30T08:19:41Z","receivedAt":"2005-09-30T08:19:41Z","isPatch":true,"sender":{"key":"snake@penza-gsm.ru","avatar":null},"body":"On Tuesday 27, September 2005 16:54 David Mansfield wrote:\n> On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:\n> > (Re-post. Sorry for any inconvenience.)\n> >\n> > On September 14, 2005 23:34 Petr Baudis wrote:\n> > > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\n> > > where Junio C Hamano <junkio@cox.net> told me that...\n> > >\n> > > > David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> > > > > The authorship info in commits created by git-cvsimport-script\n> > > > > only contains the username of the CVS committer.  This patch\n> > > > > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > > > > possible to specify an email domain that is added to all email\n> > > > > addresses in the commit \"author\" and \"committer\" fields.\n> > > > >\n> > > > > ---\n> > > > > I have stopped using cvsimport, because cvsps seems to produce bad\n> > > > > output on the repository I'm using it with, but I had already\n> > > > > prepared this patch.\n> > > >\n> > > > Hmph.  One reason the original implementation did not do this is\n> > > > because Linus and other people wanted to have a repeatability,\n> > > > so making this an optional thing is good, but if we go this\n> > > > route, I think if it would be nicer to have a --author-map\n> > > > option that lets you feed a list of:\n> > > >\n> > > >     <author> ==> \"A U Thor <author@author.dom>\"\n> > > >\n> > > > mappings, instead of a single -e, which essentially does not add\n> > > > much information to the result.\n> > > >\n> > > > I take that your oob comment indicates that you do not have much\n> > > > incentive/inclination to further hack on this, so I am not\n> > > > asking you to do the above even if you find my suggestion\n> > > > worthwhile.\n> > >\n> > > Various tools use CVSROOT/users to map usernames to realname <email>.\n> > > I actually wanted to send a patch, looked at the cvsimport script and\n> > > got totally scared away (at least for now)... ;-)\n> >\n> > git uses cvsps output to determine authorship. Do you think if this\n> > problem should be solved on cvsps side? It should be relatively easy\n> > IMHO. David, can you add another key to output CVSROOT/users mapping\n> > result instead of usernames if available?\n>\n> I apologize that I probably won't have time to look at this right now...\n>\n> David\n\nHello. I have improved my patch and tested it with git-cvsimport-script.\ncvsps works as intended so I hope that you, David will accept this patch. You can find it here:\nhttp://www.penza-gsm.ru/snake/use_CVSROOT_users.patch\n\nThough git-cvsimport-script not works as good as I wanted. It confuses with cvsps output like\nAuthor: Alexey Nezhdanov <snakeru at users.sourceforge.net>\nand converts it to something like\nAlexey Nezhdanov snakeru at users.sourceforge.net <Alexey Nezhdanov snakeru at users.sourceforge.net>\n\nUnfortunately I do not know perl so I can not write a patch for git-cvsimport-script.\nSo I asking you, Matthias, to help with this or may somebody on this list can do it instead.\n\n-- \nRespectfully\nAlexey Nezhdanov\n"},{"id":"9543","messageId":"7v64sj6iva.fsf@assigned-by-dhcp.cox.net","threadId":"1742","inReplyTo":"200509301219.42087.snake@penza-gsm.ru","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-30T08:48:57Z","receivedAt":"2005-09-30T08:48:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexey Nezhdanov <snake@penza-gsm.ru> writes:\n\n> Unfortunately I do not know perl so I can not write a patch for git-cvsimport-script.\n> So I asking you, Matthias, to help with this or may somebody on this list can do it instead.\n\nUntested, but something like this?\n\n------------\n[PATCH] Pass CVSps generated A U Thor <author@domain.xz> intact.\n\nAlexey Nezhdanov updated CVSps to generate author-name and\nauthor-email information in its output.\n\nIf the input looks like it has that already properly formatted,\nuse that without our own munging.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -510,7 +510,7 @@ unless($pid) {\n \n my $state = 0;\n \n-my($patchset,$date,$author,$branch,$ancestor,$tag,$logmsg);\n+my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);\n my(@old,@new);\n my $commit = sub {\n \tmy $pid;\n@@ -591,11 +591,11 @@ my $commit = sub {\n \t\t}\n \n \t\texec(\"env\",\n-\t\t\t\"GIT_AUTHOR_NAME=$author\",\n-\t\t\t\"GIT_AUTHOR_EMAIL=$author\",\n+\t\t\t\"GIT_AUTHOR_NAME=$author_name\",\n+\t\t\t\"GIT_AUTHOR_EMAIL=$author_email\",\n \t\t\t\"GIT_AUTHOR_DATE=\".strftime(\"+0000 %Y-%m-%d %H:%M:%S\",gmtime($date)),\n-\t\t\t\"GIT_COMMITTER_NAME=$author\",\n-\t\t\t\"GIT_COMMITTER_EMAIL=$author\",\n+\t\t\t\"GIT_COMMITTER_NAME=$author_name\",\n+\t\t\t\"GIT_COMMITTER_EMAIL=$author_email\",\n \t\t\t\"GIT_COMMITTER_DATE=\".strftime(\"+0000 %Y-%m-%d %H:%M:%S\",gmtime($date)),\n \t\t\t\"git-commit-tree\", $tree,@par);\n \t\tdie \"Cannot exec git-commit-tree: $!\\n\";\n@@ -638,7 +638,7 @@ my $commit = sub {\n \t\tprint $out \"object $cid\\n\".\n \t\t    \"type commit\\n\".\n \t\t    \"tag $xtag\\n\".\n-\t\t    \"tagger $author <$author>\\n\"\n+\t\t    \"tagger $author_name <$author_email>\\n\"\n \t\t    or die \"Cannot create tag object $xtag: $!\\n\";\n \t\tclose($out)\n \t\t    or die \"Cannot create tag object $xtag: $!\\n\";\n@@ -683,7 +683,11 @@ while(<CVS>) {\n \t\t$state=3;\n \t} elsif($state == 3 and s/^Author:\\s+//) {\n \t\ts/\\s+$//;\n-\t\t$author = $_;\n+\t\tif (/^(.*?)\\s+<(.*)>/) {\n+\t\t    ($author_name, $author_email) = ($1, $2);\n+\t\t} else {\n+\t\t    $author_name = $author_email = $_;\n+\t\t}\n \t\t$state = 4;\n \t} elsif($state == 4 and s/^Branch:\\s+//) {\n \t\ts/\\s+$//;\n"},{"id":"9545","messageId":"200509301422.14677.snake@penza-gsm.ru","threadId":"1742","inReplyTo":"7v64sj6iva.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"Alexey Nezhdanov","fromEmail":"snake@penza-gsm.ru","sentAt":"2005-09-30T10:22:14Z","receivedAt":"2005-09-30T10:22:14Z","isPatch":true,"sender":{"key":"snake@penza-gsm.ru","avatar":null},"body":"On Friday 30, September 2005 12:48 Junio C Hamano wrote:\n> Alexey Nezhdanov <snake@penza-gsm.ru> writes:\n> > Unfortunately I do not know perl so I can not write a patch for\n> > git-cvsimport-script. So I asking you, Matthias, to help with this or may\n> > somebody on this list can do it instead.\n>\n> Untested, but something like this?\n<skipped/>\nYes, now it works correctly and can go down to master IMHO. One little notice, \nthough. It is still prints out \"* UNKNOWN LINE *\" for each authorname in the \nnew format.\nThis is not result of your patch - it started doing this immidiatedly after I \ntried updated version of cvsps (I have not mentioned this in my previous \nmail, sorry). Let's wait if somebody will fix it.\nIn any way, \n\nANNOUNCE:\n=========\nWith my patch to cvsps and Junio's patch to git-cvsimport.perl it is now \npossible to import authorname+email pairs correctly basing on contents of \nCVSROOT/users file. Currently cvsps can't retrieve this file in --cvs-direct \nmode (that git-cvsimport.perl uses) so you'll need to check it out by hand. \nMay be if David will find some time for it this limitation will be lifted.\n\nSo now you can do either:\ncvs checkout CVSROOT/users\nor\nmkdir CVSROOT && echo \"author:A U Thor <author@domain.xz>\" >CVSROOT/users\nand then\ngit cvsimport -p \"--users-file,CVSROOT/users\"\n\nyou will import all mapped usernames correctly.\n\n-- \nRespectfully\nAlexey Nezhdanov\n"},{"id":"9553","messageId":"1128088485.30421.80.camel@gandalf.cobite.com","threadId":"1742","inReplyTo":"200509301219.42087.snake@penza-gsm.ru","subject":"Re: [PATCH] Added an option to cvsimport to specify email domain","fromName":"David Mansfield","fromEmail":"david@cobite.com","sentAt":"2005-09-30T13:54:45Z","receivedAt":"2005-09-30T13:54:45Z","isPatch":true,"sender":{"key":"david@cobite.com","avatar":null},"body":"On Fri, 2005-09-30 at 12:19 +0400, Alexey Nezhdanov wrote:\n> On Tuesday 27, September 2005 16:54 David Mansfield wrote:\n> > On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:\n> > > (Re-post. Sorry for any inconvenience.)\n> > >\n> > > On September 14, 2005 23:34 Petr Baudis wrote:\n> > > > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter\n> > > > where Junio C Hamano <junkio@cox.net> told me that...\n> > > >\n> > > > > David K?.A?Negedal <davidk@lysator.liu.se> writes:\n> > > > > > The authorship info in commits created by git-cvsimport-script\n> > > > > > only contains the username of the CVS committer.  This patch\n> > > > > > adds a flag -e <domain> to git-cvsimport-script that makes it\n> > > > > > possible to specify an email domain that is added to all email\n> > > > > > addresses in the commit \"author\" and \"committer\" fields.\n> > > > > >\n> > > > > > ---\n> > > > > > I have stopped using cvsimport, because cvsps seems to produce bad\n> > > > > > output on the repository I'm using it with, but I had already\n> > > > > > prepared this patch.\n> > > > >\n> > > > > Hmph.  One reason the original implementation did not do this is\n> > > > > because Linus and other people wanted to have a repeatability,\n> > > > > so making this an optional thing is good, but if we go this\n> > > > > route, I think if it would be nicer to have a --author-map\n> > > > > option that lets you feed a list of:\n> > > > >\n> > > > >     <author> ==> \"A U Thor <author@author.dom>\"\n> > > > >\n> > > > > mappings, instead of a single -e, which essentially does not add\n> > > > > much information to the result.\n> > > > >\n> > > > > I take that your oob comment indicates that you do not have much\n> > > > > incentive/inclination to further hack on this, so I am not\n> > > > > asking you to do the above even if you find my suggestion\n> > > > > worthwhile.\n> > > >\n> > > > Various tools use CVSROOT/users to map usernames to realname <email>.\n> > > > I actually wanted to send a patch, looked at the cvsimport script and\n> > > > got totally scared away (at least for now)... ;-)\n> > >\n> > > git uses cvsps output to determine authorship. Do you think if this\n> > > problem should be solved on cvsps side? It should be relatively easy\n> > > IMHO. David, can you add another key to output CVSROOT/users mapping\n> > > result instead of usernames if available?\n> >\n> > I apologize that I probably won't have time to look at this right now...\n> >\n> > David\n> \n> Hello. I have improved my patch and tested it with git-cvsimport-script.\n> cvsps works as intended so I hope that you, David will accept this patch. You can find it here:\n> http://www.penza-gsm.ru/snake/use_CVSROOT_users.patch\n> \n> Though git-cvsimport-script not works as good as I wanted. It confuses with cvsps output like\n> Author: Alexey Nezhdanov <snakeru at users.sourceforge.net>\n> and converts it to something like\n> Alexey Nezhdanov snakeru at users.sourceforge.net <Alexey Nezhdanov snakeru at users.sourceforge.net>\n> \n> Unfortunately I do not know perl so I can not write a patch for git-cvsimport-script.\n> So I asking you, Matthias, to help with this or may somebody on this list can do it instead.\n> \n\nCool. I'll definitely take a look.  Thanks for taking the time.\n\nDavid\n"}]}