Allow script to be used without a git alias
The script as it exists today relies on an ssh alias, which leads to
non-obvious error messages if it's not set up. This is a case where
99% of the time people will be using the defaults, so we should make the
defaults as helpful as we can.
Tested:
Ran the commands in the README and saw that they succeeded.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I754b31ad9dae47af20c7cd8f4bbb4951119d061d
diff --git a/tof-voters/libvoters/subcmd/dump-gerrit.py b/tof-voters/libvoters/subcmd/dump-gerrit.py
index 455f0e6..32a3766 100644
--- a/tof-voters/libvoters/subcmd/dump-gerrit.py
+++ b/tof-voters/libvoters/subcmd/dump-gerrit.py
@@ -14,8 +14,14 @@
p.add_argument(
"--server",
"-s",
- help="Gerrit server SSH alias (default=openbmc.gerrit)",
- default="openbmc.gerrit",
+ help="Gerrit server SSH alias (default=gerrit.openbmc-project.xyz)",
+ default="gerrit.openbmc-project.xyz",
+ )
+ p.add_argument(
+ "--port",
+ "-p",
+ help="Gerrit server SSH port (default=29418)",
+ default="29418",
)
p.add_argument(
"--after",
@@ -38,6 +44,7 @@
query = list(
ssh(
args.server,
+ "-p", args.port,
"gerrit",
"query",
"--format=json",