chiark / gitweb /
Support dgit-distro.<distro>.keyid config option.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index b3a4e9b7fc10252debef9133c3010f6be52ac498..78a0e31dbd44a4efee44fb1661c475f261da256f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -70,7 +70,11 @@ my $lbranch_re = '^refs/heads/'.$branchprefix.'/([^/.]+)$';
 sub lref () { return "refs/heads/".lbranch(); }
 sub lrref () { return "refs/remotes/$remotename/$csuite"; }
 sub rrref () { return "refs/$branchprefix/$csuite"; }
-sub debiantag ($) { return "debian/$_[0]"; }
+sub debiantag ($) { 
+    my ($v) = @_;
+    $v =~ y/~:/_%/;
+    return "debian/$v";
+}
 
 sub dscfn ($) { return "${package}_$_[0].dsc"; }
 
@@ -811,6 +815,9 @@ sub dopush () {
        print "[new .dsc left in $dscfn.tmp]\n";
     }
     if ($sign) {
+       if (!defined $keyid) {
+           $keyid = access_cfg('keyid','RETURN-UNDEF');
+       }
        my @tag_cmd = (@git, qw(tag -s -m),
                       "Release $dversion for $csuite [dgit]");
        push @tag_cmd, qw(-u),$keyid if defined $keyid;