chiark / gitweb /
wip changes for remote push - implement i_want
[dgit.git] / dgit
diff --git a/dgit b/dgit
index b4de99a19cd90a1c51ab9d5990754ac1f1c7d215..6c1477cc1a2affccefb882dbda8550577096bae9 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1446,6 +1446,7 @@ our %i_wanted;
 
 sub i_resp_want ($) {
     my ($keyword) = @_;
+    die "$keyword ?" if $i_wanted{$keyword}++;
     my @localpaths = i_method "i_want_", $keyword;
     foreach my $localpath (@localpaths) {
        protocol_send_file \*RI, $localpath;
@@ -1464,6 +1465,28 @@ sub i_localname_dsc {
     return $dscfn;
 }
 
+sub i_want_signed_tag {
+    defined $i_param{'head'} && defined $dscfn
+       or badproto \*RO, "sequencing error";
+    my $head = $i_param{'head'};
+    die if $head =~ m/[^0-9a-f]/ || $head !~ m/^../;
+
+    push_parse_dsc $i_dscfn, 'remote dsc', 
+
+    push_mktag $head, $i_clogp, $i_tag,
+        $dsc, $i_dscfn,
+        'remote.changes', 'remote changes',
+        'tag.tag';
+
+    return 'tag.tag';
+}
+
+sub i_want_signed_dsc_changes {
+    rename "$i_dscfn.tmp","$i_dscfn" or die "$i_dscfn $!";
+    sign_changes 'remote.changes';
+    return ($i_dscfn, 'remote.changes');
+}
+
 #---------- building etc. ----------
 
 our $version;