From 3201106edaaaa5859f8a4f1228e250f9f8968428 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 28 Jun 2019 14:19:25 +0100 Subject: infra: Drop support for old tag name on server side Signed-off-by: Ian Jackson --- infra/dgit-repos-server | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'infra') diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server index a8b9400..7c7262f 100755 --- a/infra/dgit-repos-server +++ b/infra/dgit-repos-server @@ -539,15 +539,12 @@ sub readupdates () { STDIN->error and die $!; reject "push is missing tag ref update" unless %tags; - my @newtags = grep { m#^archive/# } keys %tags; - my @omtags = grep { !m#^archive/# } keys %tags; - reject "pushing too many similar tags" if @newtags>1 || @omtags>1; - if (@newtags) { - ($tagname) = @newtags; - ($maint_tagname) = @omtags; - } else { - ($tagname) = @omtags or die; - } + my @dtags = grep { m#^archive/# } keys %tags; + reject "need exactly one archive/* tag" if @dtags!=1; + my @mtags = grep { !m#^archive/# } keys %tags; + reject "pushing too many non-dgit tags" if @mtags>1; + ($tagname) = @dtags; + ($maint_tagname) = @mtags; $tagval = $tags{$tagname}; $maint_tagval = $tags{$maint_tagname // ''}; @@ -862,8 +859,7 @@ sub checks () { grep { $tagname eq $_ } @expecttagnames or die; foreach my $othertag (grep { $_ ne $tagname } @expecttagnames) { - reject "tag $othertag (pushed with differing dgit version)". - " already exists -". + reject "tag $othertag already exists -". " not replacing previously-pushed version" if git_get_ref "refs/tags/".$othertag; } -- cgit v1.2.3