ProjectRepairer: Use rsync --progress instead of -P '-P' is '--partial --progress'. When a transfer is aborted, '--partial' renames the temporary file rsync was streaming into onto the final destination name, leaving a truncated file where a complete one is expected. Keep '--progress' for the transfer output and let rsync discard its temporary file on failure. Change-Id: Icb4c37c5dfc950e1472447597a9cfade3bd97765
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ProjectRepairer.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ProjectRepairer.java index 5866569..669a374 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ProjectRepairer.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ProjectRepairer.java
@@ -96,7 +96,8 @@ throws InterruptedException { List<String> cmd = new ArrayList<>(); cmd.add(replicationConfig.getRsyncPath()); - cmd.add("-avP"); + cmd.add("-av"); + cmd.add("--progress"); cmd.add("-e"); cmd.add(buildSshTransport(uri)); for (String inc : includes) {