chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5ad34fc
)
rename upload_hash to lastpush_hash
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 20:42:23 +0000
(21:42 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 20:42:23 +0000
(21:42 +0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index 42675366103fca6876e2ea93e1e9dae95b842776..562cef08f913eab9dbf2910dccf6da94c00372a7 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-485,7
+485,7
@@
sub create_remote_git_repo () {
}
}
}
}
-our ($dsc_hash,$
upload
_hash);
+our ($dsc_hash,$
lastpush
_hash);
our $ud = '.git/dgit/unpack';
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";
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';
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
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
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
Last allegedly pushed/uploaded: $oversion (newer or same)
$later_warning_msg
END
- $outputhash = $
upload
_hash;
+ $outputhash = $
lastpush
_hash;
} else {
} else {
- $outputhash = $
upload
_hash;
+ $outputhash = $
lastpush
_hash;
}
}
chdir '../../../..' or die $!;
}
}
chdir '../../../..' or die $!;
@@
-703,47
+703,47
@@
sub fetch_from_archive () {
my $lrref_fn = ".git/".lrref();
if (open H, $lrref_fn) {
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) {
} elsif ($! == &ENOENT) {
- $
upload
_hash = '';
+ $
lastpush
_hash = '';
} else {
die "$lrref_fn $!";
}
} 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().")"
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();
$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
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
$later_warning_msg
END
- $hash = $
upload
_hash;
+ $hash = $
lastpush
_hash;
} else {
fail "archive's .dsc refers to ".$dsc_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";
}
} 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)"
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;
my @upd_cmd = (@git, qw(update-ref -m), 'dgit fetch', lrref(), $hash);
if (!$dryrun) {
cmdoutput @upd_cmd;