From f1420840d1ed8818fead68d698e5447342655eea Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 28 Apr 1996 12:32:43 +0000 Subject: [PATCH] Fix a bogon that prevented easy-import from inserting the new module name in alphabetical order (broken by my previous commit). Pointed out by: asami --- gnu/usr.bin/cvs/contrib/easy-import.pl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gnu/usr.bin/cvs/contrib/easy-import.pl b/gnu/usr.bin/cvs/contrib/easy-import.pl index c12ad3f0ef2e..68d702723017 100644 --- a/gnu/usr.bin/cvs/contrib/easy-import.pl +++ b/gnu/usr.bin/cvs/contrib/easy-import.pl @@ -8,7 +8,7 @@ # # Written by Jörg Wunsch, 95/03/07, and placed in the public domain. # -# $Id: easy-import.pl,v 1.5 1996/01/02 07:39:03 joerg Exp $ +# $Id: easy-import.pl,v 1.6 1996/04/07 10:22:37 joerg Exp $ require "complete.pl"; require "getopts.pl"; @@ -22,7 +22,7 @@ sub scan_opts $dont_do_it = "-n" if $opt_n; if($opt_v) { - print STDERR '$Source: /home/ncvs/src/gnu/usr.bin/cvs/contrib/easy-import.pl,v $ $Revision: 1.5 $' . "\n"; # 'emacs kludge + print STDERR '$Source: /home/ncvs/src/gnu/usr.bin/cvs/contrib/easy-import.pl,v $ $Revision: 1.6 $' . "\n"; # 'emacs kludge exit 0; } die "usage: $0 [-v] [-n] [moduledir]\n" . @@ -343,15 +343,14 @@ print "${so}This is your last chance to interrupt, " . $| = 0; <>; -$mod = ""; -foreach $tmp (@cvsmods) { - if($tmp gt $modname) { - $mod = $tmp; - last; - } -} - if (!$branchimport) { + $mod = ""; + foreach $tmp (sort(keys(%cvsmods))) { + if($tmp gt $modname) { + $mod = $tmp; + last; + } + } if($mod eq "") { # we are going to append our module $cmd = "\$\na\n";