chiark / gitweb /
wip changes for remote push
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Sep 2013 21:19:25 +0000 (22:19 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 15 Sep 2013 11:57:07 +0000 (12:57 +0100)
dgit

diff --git a/dgit b/dgit
index 1838f2f..0bf0585 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -936,7 +936,8 @@ sub dopush () {
 #    runcmd @git, qw(fetch -p ), "$alioth_git/$package.git",
 #        map { lref($_).":".rref($_) }
 #        (uploadbranch());
-    $dsc->{$ourdscfield[0]} = rev_parse('HEAD');
+    my $head = rev_parse('HEAD');
+    $dsc->{$ourdscfield[0]} = $head;
     $dsc->save("../$dscfn.tmp") or die $!;
     if (!$changesfile) {
        my $multi = "../${package}_".(stripepoch $cversion)."_multi.changes";
@@ -960,6 +961,7 @@ sub dopush () {
                " does not match changelog \`$clogp->{$field}'";
     }
     my $tag = debiantag($dversion);
+    runcmd @git, qw(check-ref-format), $tag;
     if (!check_for_git()) {
        create_remote_git_repo();
     }
@@ -974,11 +976,15 @@ sub dopush () {
        if (!defined $keyid) {
            $keyid = access_cfg('keyid','RETURN-UNDEF');
        }
-       my @tag_cmd = (@git, qw(tag -s -m),
+       my @tag_cmd = (@git, qw(tag -a -m),
                       "$package release $dversion for $csuite [dgit]");
-       push @tag_cmd, qw(-u),$keyid if defined $keyid;
        push @tag_cmd, $tag;
        runcmd_ordryrun @tag_cmd;
+       
+
+       push @tag_cmd, qw(-u),$keyid if defined $keyid;
+       push @tag_cmd, qw(-u),$keyid if defined $keyid;
+
        my @debsign_cmd = @debsign;
        push @debsign_cmd, "-k$keyid" if defined $keyid;
        push @debsign_cmd, $changesfile;