git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Added an option to cvsimport to specify email domain
@ 2005-09-07  8:00 David Kågedal
  2005-09-07 19:18 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: David Kågedal @ 2005-09-07  8:00 UTC (permalink / raw)
  To: git

The authorship info in commits created by git-cvsimport-script
only contains the username of the CVS committer.  This patch
adds a flag -e <domain> to git-cvsimport-script that makes it
possible to specify an email domain that is added to all email
addresses in the commit "author" and "committer" fields.

---
I have stopped using cvsimport, because cvsps seems to produce bad
output on the repository I'm using it with, but I had already prepared
this patch.

 Documentation/git-cvsimport-script.txt |    8 +++++++-
 git-cvsimport-script                   |   18 +++++++++++++-----
 2 files changed, 20 insertions(+), 6 deletions(-)

cabbc2b5cae2dcd892d02a3c679698cdfb3b9de5
diff --git a/Documentation/git-cvsimport-script.txt b/Documentation/git-cvsimport-script.txt
--- a/Documentation/git-cvsimport-script.txt
+++ b/Documentation/git-cvsimport-script.txt
@@ -12,7 +12,9 @@ SYNOPSIS
 'git-cvsimport-script' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
 			[ -d <CVSROOT> ] [ -p <options-for-cvsps> ]
 			[ -C <GIT_repository> ] [ -i ] [ -k ]
-			[ -s <subst> ] [ -m ] [ -M regex ] [ <CVS_module> ]
+			[ -s <subst> ] [ -m ] [ -M regex ]
+			[ -e <domain> ]
+			[ <CVS_module> ]
 
 
 DESCRIPTION
@@ -86,6 +88,10 @@ OPTIONS
 -s <subst>::
 	Substitute the character "/" in branch names with <subst>
 
+-e <domain>::
+        Append '@<domain>' to the author name to use as the email
+        address in commit objects.
+
 OUTPUT
 ------
 If '-v' is specified, the script reports what it is doing.
diff --git a/git-cvsimport-script b/git-cvsimport-script
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -29,19 +29,20 @@ use IPC::Open2;
 $SIG{'PIPE'}="IGNORE";
 $ENV{'TZ'}="UTC";
 
-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);
+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);
 
 sub usage() {
 	print STDERR <<END;
 Usage: ${\basename $0}     # fetch/update GIT from CVS
        [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT]
        [-p opts-for-cvsps] [-C GIT_repository] [-z fuzz]
-       [-i] [-k] [-u] [-s subst] [-m] [-M regex] [CVS_module]
+       [-i] [-k] [-u] [-s subst] [-m] [-M regex] [ -e email-domain ]
+       [CVS_module]
 END
 	exit(1);
 }
 
-getopts("hivmkuo:d:p:C:z:s:M:") or usage();
+getopts("hivmkuo:d:p:C:z:s:M:e:") or usage();
 usage if $opt_h;
 
 @ARGV <= 1 or usage();
@@ -85,6 +86,13 @@ if ($opt_M) {
 	push (@mergerx, qr/$opt_M/);
 }
 
+our $email_suffix;
+if ($opt_e) {
+    $email_suffix = "@"."$opt_e";
+} else {
+    $email_suffix = "";
+}
+
 select(STDERR); $|=1; select(STDOUT);
 
 
@@ -592,10 +600,10 @@ my $commit = sub {
 
 		exec("env",
 			"GIT_AUTHOR_NAME=$author",
-			"GIT_AUTHOR_EMAIL=$author",
+			"GIT_AUTHOR_EMAIL=$author$email_suffix",
 			"GIT_AUTHOR_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
 			"GIT_COMMITTER_NAME=$author",
-			"GIT_COMMITTER_EMAIL=$author",
+			"GIT_COMMITTER_EMAIL=$author$email_suffix",
 			"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
 			"git-commit-tree", $tree,@par);
 		die "Cannot exec git-commit-tree: $!\n";

-- 
David Kågedal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-07  8:00 [PATCH] Added an option to cvsimport to specify email domain David Kågedal
@ 2005-09-07 19:18 ` Junio C Hamano
  2005-09-14 19:34   ` Petr Baudis
  0 siblings, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2005-09-07 19:18 UTC (permalink / raw)
  To: David =?iso-2022-jp-2?B?SxsuQRtOZWdlZGFs?=; +Cc: git

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=iso-2022-jp-2, Size: 1159 bytes --]

David K^[.A^[Negedal <davidk@lysator.liu.se> writes:

> The authorship info in commits created by git-cvsimport-script
> only contains the username of the CVS committer.  This patch
> adds a flag -e <domain> to git-cvsimport-script that makes it
> possible to specify an email domain that is added to all email
> addresses in the commit "author" and "committer" fields.
>
> ---
> I have stopped using cvsimport, because cvsps seems to produce bad
> output on the repository I'm using it with, but I had already prepared
> this patch.

Hmph.  One reason the original implementation did not do this is
because Linus and other people wanted to have a repeatability,
so making this an optional thing is good, but if we go this
route, I think if it would be nicer to have a --author-map
option that lets you feed a list of:

    <author> ==> "A U Thor <author@author.dom>"

mappings, instead of a single -e, which essentially does not add
much information to the result.

I take that your oob comment indicates that you do not have much
incentive/inclination to further hack on this, so I am not
asking you to do the above even if you find my suggestion
worthwhile.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-07 19:18 ` Junio C Hamano
@ 2005-09-14 19:34   ` Petr Baudis
  2005-09-27  4:34     ` Alexey Nezhdanov
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Baudis @ 2005-09-14 19:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: David K?.A?Negedal, git

Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> told me that...
> David K?.A?Negedal <davidk@lysator.liu.se> writes:
> 
> > The authorship info in commits created by git-cvsimport-script
> > only contains the username of the CVS committer.  This patch
> > adds a flag -e <domain> to git-cvsimport-script that makes it
> > possible to specify an email domain that is added to all email
> > addresses in the commit "author" and "committer" fields.
> >
> > ---
> > I have stopped using cvsimport, because cvsps seems to produce bad
> > output on the repository I'm using it with, but I had already prepared
> > this patch.
> 
> Hmph.  One reason the original implementation did not do this is
> because Linus and other people wanted to have a repeatability,
> so making this an optional thing is good, but if we go this
> route, I think if it would be nicer to have a --author-map
> option that lets you feed a list of:
> 
>     <author> ==> "A U Thor <author@author.dom>"
> 
> mappings, instead of a single -e, which essentially does not add
> much information to the result.
> 
> I take that your oob comment indicates that you do not have much
> incentive/inclination to further hack on this, so I am not
> asking you to do the above even if you find my suggestion
> worthwhile.

Various tools use CVSROOT/users to map usernames to realname <email>.
I actually wanted to send a patch, looked at the cvsimport script and
got totally scared away (at least for now)... ;-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-14 19:34   ` Petr Baudis
@ 2005-09-27  4:34     ` Alexey Nezhdanov
  2005-09-27 12:54       ` David Mansfield
  2005-09-29 10:26       ` Alexey Nezhdanov
  0 siblings, 2 replies; 10+ messages in thread
From: Alexey Nezhdanov @ 2005-09-27  4:34 UTC (permalink / raw)
  To: git; +Cc: David Mansfield

(Re-post. Sorry for any inconvenience.)
On September 14, 2005 23:34 Petr Baudis wrote:
> Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
> where Junio C Hamano <junkio@cox.net> told me that...
>
> > David K?.A?Negedal <davidk@lysator.liu.se> writes:
> > > The authorship info in commits created by git-cvsimport-script
> > > only contains the username of the CVS committer.  This patch
> > > adds a flag -e <domain> to git-cvsimport-script that makes it
> > > possible to specify an email domain that is added to all email
> > > addresses in the commit "author" and "committer" fields.
> > >
> > > ---
> > > I have stopped using cvsimport, because cvsps seems to produce bad
> > > output on the repository I'm using it with, but I had already prepared
> > > this patch.
> >
> > Hmph.  One reason the original implementation did not do this is
> > because Linus and other people wanted to have a repeatability,
> > so making this an optional thing is good, but if we go this
> > route, I think if it would be nicer to have a --author-map
> > option that lets you feed a list of:
> >
> >     <author> ==> "A U Thor <author@author.dom>"
> >
> > mappings, instead of a single -e, which essentially does not add
> > much information to the result.
> >
> > I take that your oob comment indicates that you do not have much
> > incentive/inclination to further hack on this, so I am not
> > asking you to do the above even if you find my suggestion
> > worthwhile.
>
> Various tools use CVSROOT/users to map usernames to realname <email>.
> I actually wanted to send a patch, looked at the cvsimport script and
> got totally scared away (at least for now)... ;-)
git uses cvsps output to determine authorship. Do you think if this problem 
should be solved on cvsps side? It should be relatively easy IMHO.
David, can you add another key to output CVSROOT/users mapping result instead 
of usernames if available?
-- 
Respectfully
Alexey Nezhdanov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-27  4:34     ` Alexey Nezhdanov
@ 2005-09-27 12:54       ` David Mansfield
  2005-09-30  8:19         ` Alexey Nezhdanov
  2005-09-29 10:26       ` Alexey Nezhdanov
  1 sibling, 1 reply; 10+ messages in thread
From: David Mansfield @ 2005-09-27 12:54 UTC (permalink / raw)
  To: Alexey Nezhdanov; +Cc: git

On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:
> (Re-post. Sorry for any inconvenience.)
> On September 14, 2005 23:34 Petr Baudis wrote:
> > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
> > where Junio C Hamano <junkio@cox.net> told me that...
> >
> > > David K?.A?Negedal <davidk@lysator.liu.se> writes:
> > > > The authorship info in commits created by git-cvsimport-script
> > > > only contains the username of the CVS committer.  This patch
> > > > adds a flag -e <domain> to git-cvsimport-script that makes it
> > > > possible to specify an email domain that is added to all email
> > > > addresses in the commit "author" and "committer" fields.
> > > >
> > > > ---
> > > > I have stopped using cvsimport, because cvsps seems to produce bad
> > > > output on the repository I'm using it with, but I had already prepared
> > > > this patch.
> > >
> > > Hmph.  One reason the original implementation did not do this is
> > > because Linus and other people wanted to have a repeatability,
> > > so making this an optional thing is good, but if we go this
> > > route, I think if it would be nicer to have a --author-map
> > > option that lets you feed a list of:
> > >
> > >     <author> ==> "A U Thor <author@author.dom>"
> > >
> > > mappings, instead of a single -e, which essentially does not add
> > > much information to the result.
> > >
> > > I take that your oob comment indicates that you do not have much
> > > incentive/inclination to further hack on this, so I am not
> > > asking you to do the above even if you find my suggestion
> > > worthwhile.
> >
> > Various tools use CVSROOT/users to map usernames to realname <email>.
> > I actually wanted to send a patch, looked at the cvsimport script and
> > got totally scared away (at least for now)... ;-)
> git uses cvsps output to determine authorship. Do you think if this problem 
> should be solved on cvsps side? It should be relatively easy IMHO.
> David, can you add another key to output CVSROOT/users mapping result instead 
> of usernames if available?

I apologize that I probably won't have time to look at this right now...

David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-27  4:34     ` Alexey Nezhdanov
  2005-09-27 12:54       ` David Mansfield
@ 2005-09-29 10:26       ` Alexey Nezhdanov
  1 sibling, 0 replies; 10+ messages in thread
From: Alexey Nezhdanov @ 2005-09-29 10:26 UTC (permalink / raw)
  To: git

On Tuesday, 27 September 2005 08:34 Alexey Nezhdanov wrote:

Clarification: I'm currently working on patch for cvsps that will allow import 
proper usernames with emails. It is already working now but have one glitch 
that I'd like to remove prior to publishing.

> On September 14, 2005 23:34 Petr Baudis wrote:
> > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
> > where Junio C Hamano <junkio@cox.net> told me that...
> >
> > > David K?.A?Negedal <davidk@lysator.liu.se> writes:
> > > > The authorship info in commits created by git-cvsimport-script
> > > > only contains the username of the CVS committer.  This patch
> > > > adds a flag -e <domain> to git-cvsimport-script that makes it
> > > > possible to specify an email domain that is added to all email
> > > > addresses in the commit "author" and "committer" fields.
> > > >
> > > > ---
> > > > I have stopped using cvsimport, because cvsps seems to produce bad
> > > > output on the repository I'm using it with, but I had already
> > > > prepared this patch.
> > >
> > > Hmph.  One reason the original implementation did not do this is
> > > because Linus and other people wanted to have a repeatability,
> > > so making this an optional thing is good, but if we go this
> > > route, I think if it would be nicer to have a --author-map
> > > option that lets you feed a list of:
> > >
> > >     <author> ==> "A U Thor <author@author.dom>"
> > >
> > > mappings, instead of a single -e, which essentially does not add
> > > much information to the result.
> > >
> > > I take that your oob comment indicates that you do not have much
> > > incentive/inclination to further hack on this, so I am not
> > > asking you to do the above even if you find my suggestion
> > > worthwhile.
> >
> > Various tools use CVSROOT/users to map usernames to realname <email>.
> > I actually wanted to send a patch, looked at the cvsimport script and
> > got totally scared away (at least for now)... ;-)
>
> git uses cvsps output to determine authorship. Do you think if this problem
> should be solved on cvsps side? It should be relatively easy IMHO.
> David, can you add another key to output CVSROOT/users mapping result
> instead of usernames if available?

-- 
Respectfully
Alexey Nezhdanov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-27 12:54       ` David Mansfield
@ 2005-09-30  8:19         ` Alexey Nezhdanov
  2005-09-30  8:48           ` Junio C Hamano
  2005-09-30 13:54           ` David Mansfield
  0 siblings, 2 replies; 10+ messages in thread
From: Alexey Nezhdanov @ 2005-09-30  8:19 UTC (permalink / raw)
  To: David Mansfield, Matthias Urlichs; +Cc: git

On Tuesday 27, September 2005 16:54 David Mansfield wrote:
> On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:
> > (Re-post. Sorry for any inconvenience.)
> >
> > On September 14, 2005 23:34 Petr Baudis wrote:
> > > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
> > > where Junio C Hamano <junkio@cox.net> told me that...
> > >
> > > > David K?.A?Negedal <davidk@lysator.liu.se> writes:
> > > > > The authorship info in commits created by git-cvsimport-script
> > > > > only contains the username of the CVS committer.  This patch
> > > > > adds a flag -e <domain> to git-cvsimport-script that makes it
> > > > > possible to specify an email domain that is added to all email
> > > > > addresses in the commit "author" and "committer" fields.
> > > > >
> > > > > ---
> > > > > I have stopped using cvsimport, because cvsps seems to produce bad
> > > > > output on the repository I'm using it with, but I had already
> > > > > prepared this patch.
> > > >
> > > > Hmph.  One reason the original implementation did not do this is
> > > > because Linus and other people wanted to have a repeatability,
> > > > so making this an optional thing is good, but if we go this
> > > > route, I think if it would be nicer to have a --author-map
> > > > option that lets you feed a list of:
> > > >
> > > >     <author> ==> "A U Thor <author@author.dom>"
> > > >
> > > > mappings, instead of a single -e, which essentially does not add
> > > > much information to the result.
> > > >
> > > > I take that your oob comment indicates that you do not have much
> > > > incentive/inclination to further hack on this, so I am not
> > > > asking you to do the above even if you find my suggestion
> > > > worthwhile.
> > >
> > > Various tools use CVSROOT/users to map usernames to realname <email>.
> > > I actually wanted to send a patch, looked at the cvsimport script and
> > > got totally scared away (at least for now)... ;-)
> >
> > git uses cvsps output to determine authorship. Do you think if this
> > problem should be solved on cvsps side? It should be relatively easy
> > IMHO. David, can you add another key to output CVSROOT/users mapping
> > result instead of usernames if available?
>
> I apologize that I probably won't have time to look at this right now...
>
> David

Hello. I have improved my patch and tested it with git-cvsimport-script.
cvsps works as intended so I hope that you, David will accept this patch. You can find it here:
http://www.penza-gsm.ru/snake/use_CVSROOT_users.patch

Though git-cvsimport-script not works as good as I wanted. It confuses with cvsps output like
Author: Alexey Nezhdanov <snakeru at users.sourceforge.net>
and converts it to something like
Alexey Nezhdanov snakeru at users.sourceforge.net <Alexey Nezhdanov snakeru at users.sourceforge.net>

Unfortunately I do not know perl so I can not write a patch for git-cvsimport-script.
So I asking you, Matthias, to help with this or may somebody on this list can do it instead.

-- 
Respectfully
Alexey Nezhdanov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-30  8:19         ` Alexey Nezhdanov
@ 2005-09-30  8:48           ` Junio C Hamano
  2005-09-30 10:22             ` Alexey Nezhdanov
  2005-09-30 13:54           ` David Mansfield
  1 sibling, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2005-09-30  8:48 UTC (permalink / raw)
  To: Alexey Nezhdanov; +Cc: git

Alexey Nezhdanov <snake@penza-gsm.ru> writes:

> Unfortunately I do not know perl so I can not write a patch for git-cvsimport-script.
> So I asking you, Matthias, to help with this or may somebody on this list can do it instead.

Untested, but something like this?

------------
[PATCH] Pass CVSps generated A U Thor <author@domain.xz> intact.

Alexey Nezhdanov updated CVSps to generate author-name and
author-email information in its output.

If the input looks like it has that already properly formatted,
use that without our own munging.

Signed-off-by: Junio C Hamano <junkio@cox.net>

---

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -510,7 +510,7 @@ unless($pid) {
 
 my $state = 0;
 
-my($patchset,$date,$author,$branch,$ancestor,$tag,$logmsg);
+my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
 my(@old,@new);
 my $commit = sub {
 	my $pid;
@@ -591,11 +591,11 @@ my $commit = sub {
 		}
 
 		exec("env",
-			"GIT_AUTHOR_NAME=$author",
-			"GIT_AUTHOR_EMAIL=$author",
+			"GIT_AUTHOR_NAME=$author_name",
+			"GIT_AUTHOR_EMAIL=$author_email",
 			"GIT_AUTHOR_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
-			"GIT_COMMITTER_NAME=$author",
-			"GIT_COMMITTER_EMAIL=$author",
+			"GIT_COMMITTER_NAME=$author_name",
+			"GIT_COMMITTER_EMAIL=$author_email",
 			"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
 			"git-commit-tree", $tree,@par);
 		die "Cannot exec git-commit-tree: $!\n";
@@ -638,7 +638,7 @@ my $commit = sub {
 		print $out "object $cid\n".
 		    "type commit\n".
 		    "tag $xtag\n".
-		    "tagger $author <$author>\n"
+		    "tagger $author_name <$author_email>\n"
 		    or die "Cannot create tag object $xtag: $!\n";
 		close($out)
 		    or die "Cannot create tag object $xtag: $!\n";
@@ -683,7 +683,11 @@ while(<CVS>) {
 		$state=3;
 	} elsif($state == 3 and s/^Author:\s+//) {
 		s/\s+$//;
-		$author = $_;
+		if (/^(.*?)\s+<(.*)>/) {
+		    ($author_name, $author_email) = ($1, $2);
+		} else {
+		    $author_name = $author_email = $_;
+		}
 		$state = 4;
 	} elsif($state == 4 and s/^Branch:\s+//) {
 		s/\s+$//;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-30  8:48           ` Junio C Hamano
@ 2005-09-30 10:22             ` Alexey Nezhdanov
  0 siblings, 0 replies; 10+ messages in thread
From: Alexey Nezhdanov @ 2005-09-30 10:22 UTC (permalink / raw)
  To: Junio C Hamano, Matthias Urlichs, David Mansfield; +Cc: git

On Friday 30, September 2005 12:48 Junio C Hamano wrote:
> Alexey Nezhdanov <snake@penza-gsm.ru> writes:
> > Unfortunately I do not know perl so I can not write a patch for
> > git-cvsimport-script. So I asking you, Matthias, to help with this or may
> > somebody on this list can do it instead.
>
> Untested, but something like this?
<skipped/>
Yes, now it works correctly and can go down to master IMHO. One little notice, 
though. It is still prints out "* UNKNOWN LINE *" for each authorname in the 
new format.
This is not result of your patch - it started doing this immidiatedly after I 
tried updated version of cvsps (I have not mentioned this in my previous 
mail, sorry). Let's wait if somebody will fix it.
In any way, 

ANNOUNCE:
=========
With my patch to cvsps and Junio's patch to git-cvsimport.perl it is now 
possible to import authorname+email pairs correctly basing on contents of 
CVSROOT/users file. Currently cvsps can't retrieve this file in --cvs-direct 
mode (that git-cvsimport.perl uses) so you'll need to check it out by hand. 
May be if David will find some time for it this limitation will be lifted.

So now you can do either:
cvs checkout CVSROOT/users
or
mkdir CVSROOT && echo "author:A U Thor <author@domain.xz>" >CVSROOT/users
and then
git cvsimport -p "--users-file,CVSROOT/users"

you will import all mapped usernames correctly.

-- 
Respectfully
Alexey Nezhdanov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Added an option to cvsimport to specify email domain
  2005-09-30  8:19         ` Alexey Nezhdanov
  2005-09-30  8:48           ` Junio C Hamano
@ 2005-09-30 13:54           ` David Mansfield
  1 sibling, 0 replies; 10+ messages in thread
From: David Mansfield @ 2005-09-30 13:54 UTC (permalink / raw)
  To: Alexey Nezhdanov; +Cc: Matthias Urlichs, git

On Fri, 2005-09-30 at 12:19 +0400, Alexey Nezhdanov wrote:
> On Tuesday 27, September 2005 16:54 David Mansfield wrote:
> > On Tue, 2005-09-27 at 08:34 +0400, Alexey Nezhdanov wrote:
> > > (Re-post. Sorry for any inconvenience.)
> > >
> > > On September 14, 2005 23:34 Petr Baudis wrote:
> > > > Dear diary, on Wed, Sep 07, 2005 at 09:18:03PM CEST, I got a letter
> > > > where Junio C Hamano <junkio@cox.net> told me that...
> > > >
> > > > > David K?.A?Negedal <davidk@lysator.liu.se> writes:
> > > > > > The authorship info in commits created by git-cvsimport-script
> > > > > > only contains the username of the CVS committer.  This patch
> > > > > > adds a flag -e <domain> to git-cvsimport-script that makes it
> > > > > > possible to specify an email domain that is added to all email
> > > > > > addresses in the commit "author" and "committer" fields.
> > > > > >
> > > > > > ---
> > > > > > I have stopped using cvsimport, because cvsps seems to produce bad
> > > > > > output on the repository I'm using it with, but I had already
> > > > > > prepared this patch.
> > > > >
> > > > > Hmph.  One reason the original implementation did not do this is
> > > > > because Linus and other people wanted to have a repeatability,
> > > > > so making this an optional thing is good, but if we go this
> > > > > route, I think if it would be nicer to have a --author-map
> > > > > option that lets you feed a list of:
> > > > >
> > > > >     <author> ==> "A U Thor <author@author.dom>"
> > > > >
> > > > > mappings, instead of a single -e, which essentially does not add
> > > > > much information to the result.
> > > > >
> > > > > I take that your oob comment indicates that you do not have much
> > > > > incentive/inclination to further hack on this, so I am not
> > > > > asking you to do the above even if you find my suggestion
> > > > > worthwhile.
> > > >
> > > > Various tools use CVSROOT/users to map usernames to realname <email>.
> > > > I actually wanted to send a patch, looked at the cvsimport script and
> > > > got totally scared away (at least for now)... ;-)
> > >
> > > git uses cvsps output to determine authorship. Do you think if this
> > > problem should be solved on cvsps side? It should be relatively easy
> > > IMHO. David, can you add another key to output CVSROOT/users mapping
> > > result instead of usernames if available?
> >
> > I apologize that I probably won't have time to look at this right now...
> >
> > David
> 
> Hello. I have improved my patch and tested it with git-cvsimport-script.
> cvsps works as intended so I hope that you, David will accept this patch. You can find it here:
> http://www.penza-gsm.ru/snake/use_CVSROOT_users.patch
> 
> Though git-cvsimport-script not works as good as I wanted. It confuses with cvsps output like
> Author: Alexey Nezhdanov <snakeru at users.sourceforge.net>
> and converts it to something like
> Alexey Nezhdanov snakeru at users.sourceforge.net <Alexey Nezhdanov snakeru at users.sourceforge.net>
> 
> Unfortunately I do not know perl so I can not write a patch for git-cvsimport-script.
> So I asking you, Matthias, to help with this or may somebody on this list can do it instead.
> 

Cool. I'll definitely take a look.  Thanks for taking the time.

David

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-09-30 13:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-07  8:00 [PATCH] Added an option to cvsimport to specify email domain David Kågedal
2005-09-07 19:18 ` Junio C Hamano
2005-09-14 19:34   ` Petr Baudis
2005-09-27  4:34     ` Alexey Nezhdanov
2005-09-27 12:54       ` David Mansfield
2005-09-30  8:19         ` Alexey Nezhdanov
2005-09-30  8:48           ` Junio C Hamano
2005-09-30 10:22             ` Alexey Nezhdanov
2005-09-30 13:54           ` David Mansfield
2005-09-29 10:26       ` Alexey Nezhdanov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).