diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-31 18:49:55 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-05 13:41:48 +0100 |
commit | 626570adb7708d465460d236c9da1b82a23c22b4 (patch) | |
tree | ef7998844d96cb6e828d6756864690cd8836c192 /dgit | |
parent | 045ec681a42fd823280cdec86a177309ddd741f0 (diff) |
Split tags: Push the maintainer view tag, where supported
We introduce a new `maint' possibility in to the dgit-tag-format
access cfg list, presence of which indicates that the receiver is
content to receive DEP-14-style maintainer-view (ie, non-dgit0 tags.
For now, we default this to true. However, repos handled by
dgit-repos-server cannot currently cope with this, because:
* dgit-repos-server currently tries to be compatible with old
dgits which send DEP-14-named dgit tags;
* dgit-repos-server doesn't currently permit the creation of
`extraneous' (ie, non-dgit) tags and branches.
So for Debian, we do not set this flag.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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}"; } |