DORMANTno replies

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

From: Emil Medve <hidden>
Date: 2016-06-15 22:44:22
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-cvsimport.perl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 95c5eec..90bd6cc 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help