CLI

  • branch sub-commands are not listed in top-level help as are those of instance, database, project, etc.
    • server sub-commands are also not listed in top-level help
    • Should probably decide if we want to show sub-commands for all command suites in the top-level help or not. Seems we’re leaning toward doing it.
  • In edgedb branch --help, individual commands need explanations.
  • Individual command --help need documentation
  • Command options need explanations
  • Are connection options relevant to branch commands?
    • The options are not shown in --help
  • Will database commands co-exist with branch commands?
    • They are currently still there
  • edgedb project init does not ask for a branch name
    • RFC says it will: “A new project should ask the user for the branch name defaulting to “main”. We should also suggest adding edgedb.auto.toml to .gitignore.”
    • It also does not create edgedb.auto.toml
  • Should edgedb branch list the current branch? I’m not sure how to see which branch I’m on.
    • Looks like edgedb branches list does it, but it might be nice to also show it if a user runs edgedb branch
  • Is it obvious that creating a branch with edgedb branch create also switches to the new branch?
    • I like the behavior, but I didn’t necessarily expect it since git branch does not switch after creating
    • If we stop it from switching, we should add an option to automatically switch
    • If we keep it as is, maybe we add an option to stay on the current branch?
  • Renaming the current branch with edgedb branch rename throws an exception
$ edgedb branch rename b1 b2
edgedb error: ExecutionError: cannot drop the currently open database branch 'b1'
  Server traceback:
      Traceback (most recent call last):
        File "edb/server/protocol/binary.pyx", line 1001, in edb.server.protocol.binary.EdgeConnection.main_step
        File "edb/server/protocol/binary.pyx", line 952, in execute
        File "edb/server/protocol/binary.pyx", line 731, in _execute
        File "edb/server/protocol/execute.pyx", line 300, in execute
        File "edb/server/protocol/execute.pyx", line 187, in edb.server.protocol.execute.execute
        File "/Users/raddevon/Library/Application Support/edgedb/portable/5.0-beta.1/lib/python3.12/site-packages/edb/server/tenant.py", line 1204, in on_before_drop_db
          raise errors.ExecutionError(
      edb.errors.ExecutionError: cannot drop the currently open database branch 'b1'
  • I changed the name of edgedb to main, and it now marks it as “Project default” when I list branches. Is this just a hard-coded project default? There’s still no edgedb.auto.toml to define a default, so I assume it must be.
  • Lots of typing with these commands. Maybe allow for users to create aliases like git does?
  • edgedb branch wipe without a branch name could wipe the current branch