Store a record on the Confluence Cloud page its config names, and refuse to overwrite a teammate's save
CI / tests (pull_request) Failing after 1m54s
CI / tests (pull_request) Failing after 1m54s
This commit is contained in:
@@ -14,7 +14,9 @@ path is a copy under ~/.local/state/project-record/<key>/, written afresh with t
|
||||
stands, so open it again before each edit. A record that doesn't exist yet has no file at the path:
|
||||
create it there.
|
||||
|
||||
save stores the file's text in the record, and prints one line saying so. Where the record is kept
|
||||
save stores the file's text in the record, and prints one line saying so. A record kept on a
|
||||
Confluence page is saved as the version after the one open read; where a teammate saved the page
|
||||
since, save refuses, and the human decides what follows. Where the record is kept
|
||||
as a file there is nothing left to store, and it says that. Run it after every edit, so the same
|
||||
steps work wherever a project keeps the record.
|
||||
|
||||
@@ -44,7 +46,7 @@ def main(argv: list[str]) -> int:
|
||||
return 2
|
||||
home = pathlib.Path.home()
|
||||
config = located(None, home)
|
||||
done = config if isinstance(config, Failure) else act(argv[0], goals_store(config) if argv[1] == GOALS else store(config, argv[1]), home / COPIES / config.key / f"{argv[1]}.md")
|
||||
done = config if isinstance(config, Failure) else act(argv[0], goals_store(config) if argv[1] == GOALS else store(config, argv[1], home / COPIES / config.key / f"{argv[1]}.version"), home / COPIES / config.key / f"{argv[1]}.md")
|
||||
if isinstance(done, Failure):
|
||||
print(f"project-record: {done.reason}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user