3p/copybara: disable topic-mode when committing
This commit is contained in:
parent
a69c2d64ef
commit
0d3567ea7e
3 changed files with 14 additions and 1 deletions
1
third_party/copybara/copy.bara.sky
vendored
1
third_party/copybara/copy.bara.sky
vendored
|
@ -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"),
|
||||||
],
|
],
|
||||||
|
|
|
@ -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());
|
||||||
|
|
||||||
|
|
12
third_party/copybara/patches/hg-topic-mode-ignore.patch
vendored
Normal file
12
third_party/copybara/patches/hg-topic-mode-ignore.patch
vendored
Normal 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());
|
||||||
|
|
Loading…
Reference in a new issue