3p/copybara: disable topic-mode when committing

This commit is contained in:
Luke Granger-Brown 2021-07-04 15:10:44 +00:00
parent a69c2d64ef
commit 0d3567ea7e
3 changed files with 14 additions and 1 deletions

View file

@ -23,6 +23,7 @@ core.workflow(
"patches/0002-HgRepository-HGPLAIN.patch", "patches/0002-HgRepository-HGPLAIN.patch",
"patches/0003-HgDestination-nonpublishing.patch", "patches/0003-HgDestination-nonpublishing.patch",
"patches/diff-support-T.patch", "patches/diff-support-T.patch",
"patches/hg-topic-mode-ignore.patch",
]), ]),
core.move("", "third_party/copybara"), core.move("", "third_party/copybara"),
], ],

View file

@ -301,7 +301,7 @@ public class HgDestination implements Destination<HgRevision> {
ChangeMessage msg = getChangeMessage(transformResult, ORIGIN_LABEL_SEPARATOR); ChangeMessage msg = getChangeMessage(transformResult, ORIGIN_LABEL_SEPARATOR);
String date = transformResult.getTimestamp().format(DateTimeFormatter.RFC_1123_DATE_TIME); String date = transformResult.getTimestamp().format(DateTimeFormatter.RFC_1123_DATE_TIME);
localRepo.hg(localRepo.getHgDir().getParent(), "commit", "--user", localRepo.hg(localRepo.getHgDir().getParent(), "commit", "--config", "experimental.topic-mode=ignore", "--user",
transformResult.getAuthor().toString(), "--date", date, transformResult.getAuthor().toString(), "--date", date,
"-m", msg.toString()); "-m", msg.toString());

View file

@ -0,0 +1,12 @@
diff --git a/java/com/google/copybara/hg/HgDestination.java b/java/com/google/copybara/hg/HgDestination.java
--- a/java/com/google/copybara/hg/HgDestination.java
+++ b/java/com/google/copybara/hg/HgDestination.java
@@ -301,7 +301,7 @@ public class HgDestination implements De
ChangeMessage msg = getChangeMessage(transformResult, ORIGIN_LABEL_SEPARATOR);
String date = transformResult.getTimestamp().format(DateTimeFormatter.RFC_1123_DATE_TIME);
- localRepo.hg(localRepo.getHgDir().getParent(), "commit", "--user",
+ localRepo.hg(localRepo.getHgDir().getParent(), "commit", "--config", "experimental.topic-mode=ignore", "--user",
transformResult.getAuthor().toString(), "--date", date,
"-m", msg.toString());