-sub mainbranch () { return "$suite"; }
-sub uploadbranch () { return "upload/$suite"; }
+sub mainbranch () { return "dgit/$suite"; }
+sub uploadbranch () { return "dgit/$suite.upload"; }
+sub lref ($) { return "refs/heads/$_[0]"; }
+sub rref ($) { return "refs/remotes/$remotename/$_[0]"; }
$!=0; $lastupl_hash = `git show-ref --heads $lastupl_ref`;
die $! if $!;
die $? unless ($?==0 && chomp $lastupl_hash)
$!=0; $lastupl_hash = `git show-ref --heads $lastupl_ref`;
die $! if $!;
die $? unless ($?==0 && chomp $lastupl_hash)
} else {
die "missing git history even though dsc has hash" if defined $dsc_hash;
print "starting new git history\n";
} else {
die "missing git history even though dsc has hash" if defined $dsc_hash;
print "starting new git history\n";
chdir "$dstdir" or die "$dstdir $!";
runcmd qw(git init -q);
open H, "> .git/HEAD" or die $!;
chdir "$dstdir" or die "$dstdir $!";
runcmd qw(git init -q);
open H, "> .git/HEAD" or die $!;
close H or die $!;
runcmd qw(git remote add), $remotename, $alioth_git;
runcmd "git config branch.$suite.remote $remotename";
close H or die $!;
runcmd qw(git remote add), $remotename, $alioth_git;
runcmd "git config branch.$suite.remote $remotename";
my $newhash = generate_commit_from_dsc();
runcmd qw(git reset --hard), $newhash;
}
my $newhash = generate_commit_from_dsc();
runcmd qw(git reset --hard), $newhash;
}
chdir '../../../..' or die $!;
runcmd qw(git diff --exit-code), $tree;
runcmd qw(git fetch), $alioth_git,
chdir '../../../..' or die $!;
runcmd qw(git diff --exit-code), $tree;
runcmd qw(git fetch), $alioth_git,
(mainbranch(), uploadbranch());
die <<END;
if (!is_fast_fwd(mainbranch
(mainbranch(), uploadbranch());
die <<END;
if (!is_fast_fwd(mainbranch