[pkg-perl-tools] 01/02: Sync with upstream before branching
Alex Muntada
alexm-guest at moszumanska.debian.org
Mon Nov 7 00:47:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
alexm-guest pushed a commit to branch master
in repository pkg-perl-tools.
commit cbf172479e897df8efaac1c925e128da62cc0610
Author: Alex Muntada <alexm at alexm.org>
Date: Mon Nov 7 01:46:16 2016 +0100
Sync with upstream before branching
---
lib/Debian/PkgPerl/GitHub.pm | 9 +++++++--
scripts/forward | 2 +-
t/github.t | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/Debian/PkgPerl/GitHub.pm b/lib/Debian/PkgPerl/GitHub.pm
index fbaa712..a93a08d 100644
--- a/lib/Debian/PkgPerl/GitHub.pm
+++ b/lib/Debian/PkgPerl/GitHub.pm
@@ -161,12 +161,12 @@ Nothing.
=cut
sub clone_branch_patch_push {
- my ($user, $repo, $branch, $patch, $comment) = @_;
+ my ($user, $repo, $orgname, $branch, $patch, $comment) = @_;
# Clone
my $workdir = tempdir( CLEANUP => 1 );
Git::Repository->run(
- clone => "git\@github.com:$user/$repo.git",
+ clone => "git\@github.com:$orgname/$repo.git",
$workdir,
{ quiet => 1 },
);
@@ -175,6 +175,11 @@ sub clone_branch_patch_push {
{ quiet => 1 },
);
+ # Sync
+ $r->run( qw( remote add upstream ) => "https://github.com/$user/$repo.git" );
+ $r->run( pull => '--ff-only', qw( upstream master ) );
+ $r->run( push => qw( origin master ) );
+
# Branch
$r->run( checkout => '-b', $branch );
diff --git a/scripts/forward b/scripts/forward
index a1b83b0..306508d 100755
--- a/scripts/forward
+++ b/scripts/forward
@@ -617,7 +617,7 @@ sub submit_github {
unless fork_exists($gh, $orgname, $gh_repo);
my $branch = "pkg-perl-$^T";
- clone_branch_patch_push($orgname, $gh_repo, $branch, $patch, $subject);
+ clone_branch_patch_push($gh_user, $gh_repo, $orgname, $branch, $patch, $subject);
$issue_url = create_pull_request($gh, $gh_user, $gh_repo, {
title => $subject,
diff --git a/t/github.t b/t/github.t
index 467cca0..aed816c 100644
--- a/t/github.t
+++ b/t/github.t
@@ -41,7 +41,7 @@ is( $gh->user->show($orgname)->{login}, $orgname, $orgname );
create_fork($gh, $owner, $repo, $orgname)
unless fork_exists($gh, $orgname, $repo);
-clone_branch_patch_push($orgname, $repo, $branch, $patch, $comment);
+clone_branch_patch_push($owner, $repo, $orgname, $branch, $patch, $comment);
my $url = create_pull_request($gh, $owner, $repo, {
title => $comment,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list