From baa6fa37d487aeb0fd8c43442fb0fee2fd28445c Mon Sep 17 00:00:00 2001 From: Xavier Shay Date: Mon, 7 Apr 2014 11:42:37 -0700 Subject: [PATCH 1/2] Workaround for AMPS-1112 to fix build. --- pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 8ea73e1..646909d 100644 --- a/pom.xml +++ b/pom.xml @@ -136,6 +136,13 @@ + + + com.atlassian.maven.plugins + maven-amps-plugin + ${amps.version} + true + com.atlassian.maven.plugins maven-stash-plugin From 3cb6b32bd1d3ab99f146bf08b60fab13234d8321 Mon Sep 17 00:00:00 2001 From: Xavier Shay Date: Mon, 7 Apr 2014 12:38:29 -0700 Subject: [PATCH 2/2] Add --force option when pushing. --- .../java/com/englishtown/stash/hook/MirrorRepositoryHook.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java b/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java index 4db4529..baf2a74 100644 --- a/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java +++ b/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java @@ -128,6 +128,7 @@ public class MirrorRepositoryHook implements AsyncPostReceiveRepositoryHook, Rep .command("push") .argument("--prune") // this deletes locally deleted branches .argument(authenticatedUrl) + .argument("--force") // Canonical repository should always take precedence over mirror .argument("+refs/heads/*:refs/heads/*") // Only mirror heads .argument("+refs/tags/*:refs/tags/*") // and tags .errorHandler(passwordHandler)