diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-09-11 21:42:23 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-09-11 21:42:23 +0100 |
commit | 7c57131ff6c444187b09ed9be5b58e5c0112a5e2 (patch) | |
tree | d658eb9711494a81c5ed1b9714ffbdbf794dac99 /dgit | |
parent | 5ad34fce01890d99797726ee0f67bb87d13f79ab (diff) |
rename upload_hash to lastpush_hash
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -485,7 +485,7 @@ sub create_remote_git_repo () { } } -our ($dsc_hash,$upload_hash); +our ($dsc_hash,$lastpush_hash); our $ud = '.git/dgit/unpack'; @@ -596,8 +596,8 @@ END my $outputhash = make_commit qw(../commit.tmp); my $cversion = getfield $clogp, 'Version'; print "synthesised git commit from .dsc $cversion\n"; - if ($upload_hash) { - runcmd @git, qw(reset --hard), $upload_hash; + if ($lastpush_hash) { + runcmd @git, qw(reset --hard), $lastpush_hash; runcmd qw(sh -ec), 'dpkg-parsechangelog >>../changelogold.tmp'; my $oldclogp = parsecontrol('../changelogold.tmp','previous changelog'); my $oversion = getfield $oldclogp, 'Version'; @@ -608,7 +608,7 @@ END open C, ">../commit2.tmp" or die $!; print C <<END or die $!; tree $tree -parent $upload_hash +parent $lastpush_hash parent $outputhash author $authline committer $authline @@ -623,9 +623,9 @@ Version actually in archive: $cversion (older) Last allegedly pushed/uploaded: $oversion (newer or same) $later_warning_msg END - $outputhash = $upload_hash; + $outputhash = $lastpush_hash; } else { - $outputhash = $upload_hash; + $outputhash = $lastpush_hash; } } chdir '../../../..' or die $!; @@ -703,47 +703,47 @@ sub fetch_from_archive () { my $lrref_fn = ".git/".lrref(); if (open H, $lrref_fn) { - $upload_hash = <H>; - chomp $upload_hash; - die "$lrref_fn $upload_hash ?" unless $upload_hash =~ m/^\w+$/; + $lastpush_hash = <H>; + chomp $lastpush_hash; + die "$lrref_fn $lastpush_hash ?" unless $lastpush_hash =~ m/^\w+$/; } elsif ($! == &ENOENT) { - $upload_hash = ''; + $lastpush_hash = ''; } else { die "$lrref_fn $!"; } - print DEBUG "previous reference hash=$upload_hash\n"; + print DEBUG "previous reference hash=$lastpush_hash\n"; my $hash; if (defined $dsc_hash) { fail "missing git history even though dsc has hash -". " could not find commit $dsc_hash". " (should be in ".access_giturl()."#".rrref().")" - unless $upload_hash; + unless $lastpush_hash; $hash = $dsc_hash; ensure_we_have_orig(); - if ($dsc_hash eq $upload_hash) { - } elsif (is_fast_fwd($dsc_hash,$upload_hash)) { + if ($dsc_hash eq $lastpush_hash) { + } elsif (is_fast_fwd($dsc_hash,$lastpush_hash)) { print STDERR <<END or die $!; Git commit in archive is behind the last version allegedly pushed/uploaded. Commit referred to by archive: $dsc_hash -Last allegedly pushed/uploaded: $upload_hash +Last allegedly pushed/uploaded: $lastpush_hash $later_warning_msg END - $hash = $upload_hash; + $hash = $lastpush_hash; } else { fail "archive's .dsc refers to ".$dsc_hash. - " but this is an ancestor of ".$upload_hash; + " but this is an ancestor of ".$lastpush_hash; } } else { $hash = generate_commit_from_dsc(); } print DEBUG "current hash=$hash\n"; - if ($upload_hash) { + if ($lastpush_hash) { fail "not fast forward on last upload branch!". " (archive's version left in DGIT_ARCHIVE)" - unless is_fast_fwd($upload_hash, $hash); + unless is_fast_fwd($lastpush_hash, $hash); } - if ($upload_hash ne $hash) { + if ($lastpush_hash ne $hash) { my @upd_cmd = (@git, qw(update-ref -m), 'dgit fetch', lrref(), $hash); if (!$dryrun) { cmdoutput @upd_cmd; |