X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=7f13eecd19600c93d63008223fada04570e91011;hp=fcc792d6cc432619e2fd93c83a412612a50e134a;hb=648c039155014bc10acdae59e0dad5aacd000967;hpb=5d801671f8126208d31fb1649edd152165f5a999;ds=sidebyside diff --git a/dgit b/dgit index fcc792d6..7f13eecd 100755 --- a/dgit +++ b/dgit @@ -761,11 +761,6 @@ sub dopush () { # (uploadbranch()); $dsc->{$ourdscfield} = rev_parse('HEAD'); $dsc->save("../$dscfn.tmp") or die $!; - if (!$dryrun) { - rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!"; - } else { - print "[new .dsc left in $dscfn.tmp]\n"; - } if (!$changesfile) { my $pat = "${package}_c$version_*.changes"; my @cs = glob "../$pat"; @@ -779,6 +774,11 @@ sub dopush () { create_remote_git_repo(); } runcmd_ordryrun @git, qw(push),access_giturl(),"HEAD:".rrref(); + if (!$dryrun) { + rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!"; + } else { + print "[new .dsc left in $dscfn.tmp]\n"; + } if ($sign) { my @tag_cmd = (@git, qw(tag -s -m), "Release $dversion for $csuite [dgit]");