Merge branch 'stable-2.15'

* stable-2.15:
  LogFileCompressor: Do not compress live logfile error_log.json
  Specify new tip of the branch when updating submodules

Change-Id: I4dedeefda7b448fc1f0b2f9f78186a5540fb2e20
This commit is contained in:
David Pursehouse
2017-11-01 20:22:17 +09:00
3 changed files with 10 additions and 8 deletions

View File

@@ -118,7 +118,8 @@ public class LogFileCompressor implements Runnable {
return name.endsWith("_log") return name.endsWith("_log")
|| name.endsWith(".log") || name.endsWith(".log")
|| name.endsWith(".run") || name.endsWith(".run")
|| name.endsWith(".pid"); || name.endsWith(".pid")
|| name.endsWith(".json");
} }
private boolean isCompressed(Path entry) { private boolean isCompressed(Path entry) {

View File

@@ -559,6 +559,7 @@ public class SubmoduleOp {
msgbuf.append(" from branch '"); msgbuf.append(" from branch '");
msgbuf.append(s.getSubmodule().getShortName()); msgbuf.append(s.getSubmodule().getShortName());
msgbuf.append("'"); msgbuf.append("'");
msgbuf.append("\n to " + newCommit.getName());
// newly created submodule gitlink, do not append whole history // newly created submodule gitlink, do not append whole history
if (oldCommit == null) { if (oldCommit == null) {

View File

@@ -244,7 +244,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
"Update git submodules\n\n" "Update git submodules\n\n"
+ "* Update " + "* Update "
+ name("subscribed-to-project") + name("subscribed-to-project")
+ " from branch 'master'"); + " from branch 'master'\n to " + subHEAD.getName());
// The next commit should generate only its commit message, // The next commit should generate only its commit message,
// omitting previous commit logs // omitting previous commit logs
@@ -256,7 +256,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
"Update git submodules\n\n" "Update git submodules\n\n"
+ "* Update " + "* Update "
+ name("subscribed-to-project") + name("subscribed-to-project")
+ " from branch 'master'" + " from branch 'master'\n to " + subHEAD.getName()
+ "\n - " + "\n - "
+ subCommitMsg.getShortMessage()); + subCommitMsg.getShortMessage());
} }
@@ -280,7 +280,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
"Update git submodules\n\n" "Update git submodules\n\n"
+ "* Update " + "* Update "
+ name("subscribed-to-project") + name("subscribed-to-project")
+ " from branch 'master'"); + " from branch 'master'\n to " + subHEAD.getName());
// The next commit should generate only its commit message, // The next commit should generate only its commit message,
// omitting previous commit logs // omitting previous commit logs
@@ -292,7 +292,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
"Update git submodules\n\n" "Update git submodules\n\n"
+ "* Update " + "* Update "
+ name("subscribed-to-project") + name("subscribed-to-project")
+ " from branch 'master'" + " from branch 'master'\n to " + subHEAD.getName()
+ "\n - " + "\n - "
+ subCommitMsg.getFullMessage().replace("\n", "\n ")); + subCommitMsg.getFullMessage().replace("\n", "\n "));
} }
@@ -510,7 +510,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
@Test @Test
@GerritConfig(name = "submodule.verboseSuperprojectUpdate", value = "SUBJECT_ONLY") @GerritConfig(name = "submodule.verboseSuperprojectUpdate", value = "SUBJECT_ONLY")
@GerritConfig(name = "submodule.maxCombinedCommitMessageSize", value = "175") @GerritConfig(name = "submodule.maxCombinedCommitMessageSize", value = "220")
public void submoduleSubjectCommitMessageSizeLimit() throws Exception { public void submoduleSubjectCommitMessageSizeLimit() throws Exception {
assume().that(isSubmitWholeTopicEnabled()).isFalse(); assume().that(isSubmitWholeTopicEnabled()).isFalse();
testSubmoduleSubjectCommitMessageAndExpectTruncation(); testSubmoduleSubjectCommitMessageAndExpectTruncation();
@@ -535,7 +535,7 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
superRepo, superRepo,
"master", "master",
String.format( String.format(
"Update git submodules\n\n* Update %s from branch 'master'\n - %s\n\n[...]", "Update git submodules\n\n* Update %s from branch 'master'\n to %s\n - %s\n\n[...]",
name("subscribed-to-project"), subCommitMsg.getShortMessage())); name("subscribed-to-project"), subHEAD.getName(), subCommitMsg.getShortMessage()));
} }
} }