Merge branch 'stable-3.1'

* stable-3.1:
  PushOne: Improve logging of lock failure

Change-Id: Ic19ffa3aef553040d3771d2c517f7cb4b9c01a21
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
index 72cb8fb..199acce 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -377,9 +377,7 @@
         repLog.atSevere().log("Cannot replicate to %s: %s", uri, cause.getMessage());
       } else if (e instanceof LockFailureException) {
         lockRetryCount++;
-        // The LockFailureException message contains both URI and reason
-        // for this failure.
-        repLog.atSevere().log("Cannot replicate to %s: %s", uri, e.getMessage());
+        repLog.atSevere().log("Cannot replicate to %s due to lock failure", uri);
 
         // The remote push operation should be retried.
         if (lockRetryCount <= maxLockRetries) {
@@ -390,8 +388,7 @@
           }
         } else {
           repLog.atSevere().log(
-              "Giving up after %d occurrences of this error: %s during replication to %s",
-              lockRetryCount, e.getMessage(), uri);
+              "Giving up after %d lock failures during replication to %s", lockRetryCount, uri);
         }
       } else {
         if (canceledWhileRunning.get()) {