Skip to content
Snippets Groups Projects
Commit 1dae3eaa authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

Heptapod default branch: user feedback

It would be a bit overwhelming to warn users before hand about starting up
with a topic (100% draft repo), especially since that idea does not cross
the mind of people not used to topics.

However this explicit message as push feedback should help. Same
with the one for the more normal case of a public named branch from
the onset.
parent d1d9e2e5
Branches
Tags
1 merge request!107Edge cases with a topic as default Heptapod branch
......@@ -1148,6 +1148,33 @@
else:
new_default_ref = candidate_refs.pop()
if ref_is_topic(new_default_ref):
topic = gitlab_branch_from_ref(new_default_ref)
self.ui.status(
b"WARNING: this repository does not have a long-lasting "
b"Heptapod branch yet!\n"
b"WARNING: Setting temporarily '%s' as Heptapod default "
b"branch.\n"
b"WARNING: This state is not recommended: "
b"it can lead to severe problems, such as"
b"https://foss.heptapod.net/"
b"heptapod/heptapod/-/issues/1716\n"
b"RECOMMENDATION: please consider pushing a public changeset "
b"soon to get off this unhealthy condition. "
b"The content of the changeset does not matter as long "
b"as it is public. For example, "
b"an almost empty `.hgignore` would be be enough.\n" % topic
)
else:
branch = gitlab_branch_from_ref(new_default_ref)
self.ui.status(
b"Setting '%s' as Heptapod default branch.\n"
b"This can be changed if needed in "
b"Settings > Repositoy > Branch Defaults\n"
b"Note: the Heptapod branch is automatically protected, "
b"users may want to unprotect the former Heptapod "
b"default branch after changing it\n." % branch
)
self.set_default_gitlab_ref(new_default_ref)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment