From 72e8069dc7229a79cedf4814f4eda11d9ff0102f Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Fri, 13 Jan 2006 00:47:42 +0000 Subject: [PATCH] - Fix issue when X-FreeBSD-CVS-Branch is not HEAD. Submitted by: jkim Approved by: jkim --- tools/tools/mfc/mfc.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/tools/mfc/mfc.pl b/tools/tools/mfc/mfc.pl index 4f299765fcef..3dbdfdc59051 100644 --- a/tools/tools/mfc/mfc.pl +++ b/tools/tools/mfc/mfc.pl @@ -56,7 +56,7 @@ my $mfchome = $MFCHOME ? $MFCHOME : "/var/tmp/mfc"; my $mfclogin = $MFCLOGIN ? $MFCLOGIN : ""; my $cvsroot = $MFCCVSROOT ? $MFCCVSROOT : ':pserver:anoncvs@anoncvs.at.FreeBSD.org:/home/ncvs'; -my $version = "0.4.3"; +my $version = "0.4.4"; my %opt; my $commit_author; my $commit_date; @@ -125,6 +125,10 @@ sub previous_revision($) return 0 if ($rev =~ /^1\.1$/); @rev = split '\.', $rev; return undef unless @rev; + if (($#rev % 2) != 1) { + pop @rev; + return join ".", @rev; + } if ($rev[-1] == 1) { pop @rev; return &previous_revision(join ".", @rev);