Manifest repo 不再默认 Track main,导致 mono sync 报错
Summary
Mono client 问题版本:v3.1.0
Bug 引自:!17 (merged) 。
Steps to reproduce
- 按 安装步骤 完成 Mono client 的安装
- 执行
mono sync
会遇到报错
$ mono sync
fatal: Couldn't find remote ref refs/heads/main-jh
manifests: sleeping 4.0 seconds before retrying
fatal: the remote end hung up unexpectedly
remote:
remote: ========================================================================
remote:
remote: ERROR: user canceled the fetch
remote:
remote: ========================================================================
remote:
fatal: Couldn't find remote ref refs/heads/main-jh
error: in `sync`: revision refs/heads/main-jh in manifests not found
Deer@Deer-PC:~/Mono/test-bug-of-3.0.1-track-main$ fatal: the remote end hung up unexpectedly
remote:
remote: ========================================================================
remote:
remote: ERROR: user canceled the fetch
remote:
remote: ========================================================================
remote:
What is the current bug behavior?
在执行 mono sync
总是报错。
Possible fixes
diff --git a/project.py b/project.py
index 8b54715..d2448e7 100644
--- a/project.py
+++ b/project.py
@@ -4372,7 +4372,7 @@ class ManifestProject(MetaProject):
syncbuf.Finish()
if is_new or self.CurrentBranch is None:
- if not self.StartBranch("default"):
+ if not self.StartBranch("default", branch_merge=manifest_branch):
print(
"fatal: cannot create default in manifest",
file=sys.stderr,
由 路志远 编辑于