summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-23 12:53:54 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-23 12:53:54 +0100
commitf2a1ab46505797714043bb64897135972f9ffe09 (patch)
treef9ec5f6acf4ad48565ff3d500fb23febf2d58ab0
parentb92d6ac923182f1227146c9857f78c971e913585 (diff)
remote fixes - fix tag handling
-rwxr-xr-xdgit31
1 files changed, 23 insertions, 8 deletions
diff --git a/dgit b/dgit
index cb4e497..497687a 100755
--- a/dgit
+++ b/dgit
@@ -1533,6 +1533,7 @@ sub i_resp_file ($) {
my $localpath = "$i_tmp/$localname";
stat $localpath and badproto \*RO, "file $keyword ($localpath) twice";
protocol_receive_file \*RO, $localpath;
+ i_method "i_file", $keyword;
}
our %i_param;
@@ -1555,21 +1556,35 @@ sub i_resp_want ($) {
print RI "files-end\n" or die $!;
}
-our ($i_clogp, $i_version, $i_tag, $i_dscfn);
+our ($i_clogp, $i_version, $i_tag, $i_dscfn, $i_changesfn);
-sub i_localname_parsed_changelog { return "remote-changelog.822"; }
-sub i_localname_changes { return "remote.changes"; }
-sub i_localname_dsc {
+sub i_localname_parsed_changelog {
+ return "remote-changelog.822";
+}
+sub i_file_parsed_changelog {
($i_clogp, $i_version, $i_tag, $i_dscfn) =
push_parse_changelog "$i_tmp/remote-changelog.822";
die if $i_dscfn =~ m#/|^\W#;
+}
+
+sub i_localname_dsc {
+ defined $i_dscfn or badproto \*RO, "dsc (before parsed-changelog)";
return $i_dscfn;
}
+sub i_file_dsc { }
+
+sub i_localname_changes {
+ defined $i_dscfn or badproto \*RO, "dsc (before parsed-changelog)";
+ $i_changesfn = $i_dscfn;
+ $i_changesfn =~ s/\.dsc$/_dgit.changes/ or die;
+ return $i_changesfn;
+}
+sub i_file_changes { }
sub i_want_signed_tag {
printdebug Dumper(\%i_param, $i_dscfn);
defined $i_param{'head'} && defined $i_dscfn && defined $i_clogp
- or badproto \*RO, "sequencing error";
+ or badproto \*RO, "premature desire for signed-tag";
my $head = $i_param{'head'};
die if $head =~ m/[^0-9a-f]/ || $head !~ m/^../;
@@ -1578,7 +1593,7 @@ sub i_want_signed_tag {
my $tagobjfn =
push_mktag $head, $i_clogp, $i_tag,
$i_dscfn,
- 'remote.changes', 'remote changes',
+ $i_changesfn, 'remote changes',
sub { "tag$_[0]"; };
return $tagobjfn;
@@ -1586,8 +1601,8 @@ sub i_want_signed_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');
+ sign_changes $i_changesfn;
+ return ($i_dscfn, $i_changesfn);
}
#---------- building etc. ----------