chiark / gitweb /
dgit: rpush: Move push_parse_dsc earlier
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Jul 2019 15:01:01 +0000 (16:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Jul 2019 15:07:15 +0000 (16:07 +0100)
We are going to want this information sooner.

No overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 6d9a8045412d349dad14a383efeed4012f1a6a9c..a8968478059bc35220375c180d6aee2b9533de25 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5182,6 +5182,7 @@ sub i_resp_previously ($) {
 }
 
 our %i_wanted;
+our ($i_clogp, $i_version, $i_dscfn, $i_changesfn, @i_buildinfos);
 
 sub i_resp_want ($) {
     my ($keyword) = @_;
@@ -5191,8 +5192,11 @@ sub i_resp_want ($) {
     $isuite = $i_param{'isuite'} // $i_param{'csuite'};
     die unless $isuite =~ m/^$suite_re$/;
 
-    pushing();
-    rpush_handle_protovsn_bothends();
+    if (!defined $dsc) {
+       pushing();
+       rpush_handle_protovsn_bothends();
+       push_parse_dsc $i_dscfn, 'remote dsc', $i_version;
+    }
 
     my @localpaths = i_method "i_want", $keyword;
     printdebug "[[  $keyword @localpaths\n";
@@ -5202,8 +5206,6 @@ sub i_resp_want ($) {
     print RI "files-end\n" or confess "$!";
 }
 
-our ($i_clogp, $i_version, $i_dscfn, $i_changesfn, @i_buildinfos);
-
 sub i_localname_parsed_changelog {
     return "remote-changelog.822";
 }
@@ -5271,7 +5273,7 @@ sub i_want_signed_tag {
 
     die unless $i_param{'csuite'} =~ m/^$suite_re$/;
     $csuite = $&;
-    push_parse_dsc $i_dscfn, 'remote dsc', $i_version;
+    defined $dsc or badproto \*RO, "dsc (before parsed-changelog)";
 
     my @tagwants = push_tagwants $i_version, $head, $maintview, "tag";