chiark / gitweb /
dopush: Break out $changes variable
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 038df387f84dd754a3c55300f99c6d9a130bb173..60ea9194054a082193d490c85d874cc676a63ee6 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1480,9 +1480,9 @@ sub mktree_in_ud_from_only_subdir (;$) {
 }
 
 our @files_csum_info_fields = 
-    (['Checksums-Sha256','Digest::SHA', 'new(256)'],
-     ['Checksums-Sha1',  'Digest::SHA', 'new(1)'],
-     ['Files',           'Digest::MD5', 'new()']);
+    (['Checksums-Sha256','Digest::SHA', 'new(256)', 'sha256sum'],
+     ['Checksums-Sha1',  'Digest::SHA', 'new(1)',   'sha1sum'],
+     ['Files',           'Digest::MD5', 'new()',    'md5sum']);
 
 sub dsc_files_info () {
     foreach my $csumi (@files_csum_info_fields) {
@@ -3236,11 +3236,12 @@ END
     my $dgithead = $actualhead;
     my $maintviewhead = undef;
 
+    my $upstreamversion = $clogp->{Version};
+    $upstreamversion =~ s/-[^-]*$//;
+
     if (madformat_wantfixup($format)) {
        # user might have not used dgit build, so maybe do this now:
        if (quiltmode_splitbrain()) {
-           my $upstreamversion = $clogp->{Version};
-           $upstreamversion =~ s/-[^-]*$//;
            changedir $ud;
            quilt_make_fake_dsc($upstreamversion);
            my $cachekey;
@@ -3324,7 +3325,8 @@ END
 
     # Check that changes and .dsc agree enough
     $changesfile =~ m{[^/]*$};
-    files_compare_inputs($dsc, parsecontrol($changesfile,$&))
+    my $changes = parsecontrol($changesfile,$&);
+    files_compare_inputs($dsc, $changes)
        unless forceing [qw(dsc-changes-mismatch)];
 
     # Checks complete, we're going to try and go ahead: