chiark / gitweb /
dgit: rpush: Use $isuite for $isuite, not $csuite
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 16:14:21 +0000 (16:14 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 16:14:22 +0000 (16:14 +0000)
Send isuite as a parameter, and use it if it's provided, instead of
csuite.  This means config lookups like
    dgit-distro.SUITE.distro
only need the user-provided suite name (eg `unstable'), and don't need
to be duplicated for the canonical name (eg `sid').

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

diff --git a/dgit b/dgit
index f677562d3741190feabd702f957e1729130ccc76..824e9d1b3ccaaf010c25e4102bf6d3e2e9d04655 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4136,6 +4136,7 @@ END
     responder_send_file('changes',$changesfile);
     responder_send_command("param head $dgithead");
     responder_send_command("param csuite $csuite");
+    responder_send_command("param isuite $isuite");
     responder_send_command("param tagformat $tagformat");
     if (defined $maintviewhead) {
        die unless ($protovsn//4) >= 4;
@@ -4539,7 +4540,8 @@ sub i_resp_want ($) {
     die "$keyword ?" if $i_wanted{$keyword}++;
     
     defined $i_param{'csuite'} or badproto \*RO, "premature desire, no csuite";
-    $isuite = $i_param{'csuite'};
+    $isuite = $i_param{'isuite'} // $i_param{'csuite'};
+    die unless $isuite =~ m/^$suite_re$/;
 
     pushing();
     rpush_handle_protovsn_bothends();