[PATCH] git-cvsimport: Add support for CVSNT as an underlying client

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Emil Medve
Date: Thursday, March 13, 2008 - 8:08 am

CVSNT seems to feature the following relevant differences from classic CVS:
	1. Keeps the password information in ~/.cvs/cvspass instead of ~/.cvspass
	2. Used '=' to separate fields in cvspass instead of ' '

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
 git-cvsimport.perl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 95c5eec..a23ae79 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -238,12 +238,13 @@ sub conn {
 		my $rr = ":pserver:$user\@$serv:$port$repo";
 
 		unless ($pass) {
-			open(H,$ENV{'HOME'}."/.cvspass") and do {
+			open(H,$ENV{'HOME'}."/.cvspass") or
+			open(H,$ENV{'HOME'}."/.cvs/cvspass") and do {
 				# :pserver:cvs@mea.tmt.tele.fi:/cvsroot/zmailer Ah<Z
 				while (<H>) {
 					chomp;
 					s/^\/\d+\s+//;
-					my ($w,$p) = split(/\s/,$_,2);
+					my ($w,$p) = split(/\s|=/,$_,2);
 					if ($w eq $rr or $w eq $rr2) {
 						$pass = $p;
 						last;
-- 
1.5.4.GIT

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] git-cvsimport: Add support for CVSNT as an underly ..., Emil Medve, (Thu Mar 13, 8:08 am)