summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.BRANCH2
-rwxr-xr-xdgit8
-rw-r--r--tests/lib1
3 files changed, 8 insertions, 3 deletions
diff --git a/TODO.BRANCH b/TODO.BRANCH
index 7138c3b..7451476 100644
--- a/TODO.BRANCH
+++ b/TODO.BRANCH
@@ -20,6 +20,8 @@ Want tests for
old tag
- rejecting push of same version with one tag when then the other
+That, where appropriate, maint view tags are pushed to dgit git repo
+
----------
Provide --gpbpq[=:] options
diff --git a/dgit b/dgit
index 548a25b..288fc78 100755
--- a/dgit
+++ b/dgit
@@ -34,6 +34,7 @@ use POSIX;
use IPC::Open2;
use Digest::SHA;
use Digest::MD5;
+use List::Util qw(any);
use List::MoreUtils qw(pairwise);
use Debian::Dgit;
@@ -513,7 +514,7 @@ our %defcfg = ('dgit.default.distro' => 'debian',
'dgit.default.ssh' => 'ssh',
'dgit.default.archive-query' => 'madison:',
'dgit.default.sshpsql-dbname' => 'service=projectb',
- 'dgit.default.dgit-tag-format' => 'old,new',
+ 'dgit.default.dgit-tag-format' => 'old,new,maint',
'dgit-distro.debian.archive-query' => 'ftpmasterapi:',
'dgit-distro.debian.git-check' => 'url',
'dgit-distro.debian.git-check-suffix' => '/info/refs',
@@ -1161,7 +1162,7 @@ sub select_tagformat () {
die 'bug' if $tagformatfn && $tagformat_want;
# ... $tagformat_want assigned after previous select_tagformat
- my (@supported) = access_cfg_tagformats();
+ my (@supported) = grep { $_ ne 'maint' } access_cfg_tagformats();
printdebug "select_tagformat supported @supported\n";
$tagformat_want //= [ $supported[0], "distro access configuration", 0 ];
@@ -2247,7 +2248,8 @@ END
my @pushrefs = $forceflag."HEAD:".rrref();
foreach my $tw (@tagwants) {
my $view = $tw->{View};
- next unless $view eq 'dgit';
+ next unless $view eq 'dgit'
+ or any { $_ eq $view } access_cfg_tagformats();
push @pushrefs, $forceflag."refs/tags/$tw->{Tag}";
}
diff --git a/tests/lib b/tests/lib
index f1ffa8b..bd83be7 100644
--- a/tests/lib
+++ b/tests/lib
@@ -594,6 +594,7 @@ t-drs () {
t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
t-git-config dgit-distro.test-dummy.git-check true
t-git-config dgit-distro.test-dummy.git-create true
+ t-git-config dgit-distro.test-dummy.dgit-tag-format old,new
cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
cp $troot/suites $tmp/.
cp $troot/suites $tmp/suites-master