Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

renumber-migrations: Suggest setting @{u} when unset.

Mateusz Mandera99e26b066447
diff --git a/tools/renumber-migrations b/tools/renumber-migrations
index e1bf0dbec5d..4b49f821e4c 100755
--- a/tools/renumber-migrations
+++ b/tools/renumber-migrations
@@ -111,7 +111,17 @@ def get_upstream_files(app_label: str) -> set[str] | None:
text=True,
check=True,
)
- except (FileNotFoundError, subprocess.CalledProcessError):
+ except FileNotFoundError:
+ return None
+ except subprocess.CalledProcessError:
+ print(
+ "This branch has no upstream tracking branch (@{u} is not set).\n"
+ "Falling back to interactive prompts for each conflict group.\n"
+ "\n"
+ "For the faster auto-resolve flow, you can exit (Ctrl-C), then run:\n"
+ " git branch --set-upstream-to=upstream/main\n"
+ "and re-run this script."
+ )
return None
return {
basename