X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=98fd04d17e1fa1940e38fa0f3cd720ea790e4484;hp=4550a86d897a8bb2e208e62b7630f2838f8a7401;hb=933e414e5217e473cd96a5f78a2473cda8edf0a3;hpb=bd9da469ec0702223270445ced410a54fb3d5158 diff --git a/dgit b/dgit index 4550a86d..98fd04d1 100755 --- a/dgit +++ b/dgit @@ -247,6 +247,7 @@ our %defcfg = ('dgit.default.distro' => 'debian', 'dgit-distro.debian.sshdakls-host' => 'coccia.debian.org', 'dgit-distro.debian.sshdakls-dir' => '/srv/ftp-master.debian.org/ftp/dists', + 'dgit-distro.debian.upload-host' => 'ftp-master', # for dput 'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/'); sub cfg { @@ -443,8 +444,6 @@ sub get_archive_dsc () { $dscurl = access_cfg('mirror').$subpath; $dscdata = url_get($dscurl); next unless defined $dscdata; - $dscurl = access_cfg('mirror').$subpath; - $dscdata = url_get($dscurl); my $dscfh = new IO::File \$dscdata, '<' or die $!; print DEBUG Dumper($dscdata) if $debug>1; $dsc = parsecontrolfh($dscfh,$dscurl, allow_pgp=>1); @@ -681,8 +680,7 @@ sub is_fast_fwd ($$) { } sub git_fetch_us () { - badusage "cannot dry run with fetch" if $dryrun; - runcmd @git, qw(fetch),access_giturl(),fetchspec(); + runcmd_ordryrun @git, qw(fetch),access_giturl(),fetchspec(); } sub fetch_from_archive () { @@ -769,7 +767,7 @@ sub clone ($) { if (check_for_git()) { print "fetching existing git history\n"; git_fetch_us(); - runcmd @git, qw(fetch origin); + runcmd_ordryrun @git, qw(fetch origin); } else { print "starting new git history\n"; } @@ -913,6 +911,7 @@ sub dopush () { create_remote_git_repo(); } runcmd_ordryrun @git, qw(push),access_giturl(),"HEAD:".rrref(); + runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD'; if (!$dryrun) { rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!"; } else { @@ -923,7 +922,7 @@ sub dopush () { $keyid = access_cfg('keyid','RETURN-UNDEF'); } my @tag_cmd = (@git, qw(tag -s -m), - "Release $dversion for $csuite [dgit]"); + "$package release $dversion for $csuite [dgit]"); push @tag_cmd, qw(-u),$keyid if defined $keyid; push @tag_cmd, $tag; runcmd_ordryrun @tag_cmd; @@ -1056,6 +1055,7 @@ sub build_maybe_quilt_fixup () { my $ncommits = 3; my $patchname = "auto-$version-$headref-$time"; my $msg = cmdoutput @git, qw(log), "-n$ncommits"; + mkpath '.git/dgit'; my $descfn = ".git/dgit/quilt-description.tmp"; open O, '>', $descfn or die "$descfn: $!"; $msg =~ s/\n/\n /g;