Repository navigation
feat!: drop the default wiki; a working tree remembers its own - #32
Merged
Merged
Conversation
wikisync assumed Appropedia when --host was left out. The first pull into an empty folder now needs --host (and --path if api.php isn't under /w/). After that, pull and push in the folder use the host and path already recorded in .wikisync/manifest.json, and refuse a different --host or --path, so a tree only ever talks to one wiki. Trees pulled by earlier versions already record their wiki and keep working without --host. A bare pull in an empty folder still reports nothing to pull, and a push there still reports nothing to push. Help text, docs and examples use wiki.example.org. The live integration test needs WIKISYNC_TEST_HOST instead of defaulting to Appropedia. BREAKING CHANGE: `wikisync pull "Page"` into a new folder needs `--host www.appropedia.org` to reach Appropedia.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wikisync no longer assumes Appropedia. The first
pullinto an empty folderneeds
--host(and--pathifapi.phpisn't under/w/). After that,pulland
pushin the folder use the wiki recorded in.wikisync/manifest.json, andrefuse a different
--hostor--path.Behaviour
--host--host is required for a working tree with no pages yet, exit 2--hostor--paththerethis working tree tracks pages from …; use a separate --dir, exit 2pullin an empty folderpushin an empty folder--host(it already records its wiki)Trees from before this change could mix wikis. In that case
--hostpicks one.Also
wiki.example.org. The READMEkeeps one factual line: tested against MediaWiki 1.45 in CI, and used against
Appropedia.
just test-liveneedsWIKISYNC_TEST_HOST. A required run without it failsrather than skips. The Docker run is unaffected: it passes
WIKISYNC_TEST_API_URL.version bump to 0.3.0 follows in its own PR.
Verification
core.ResolveWikitests cover: an empty tree, the recorded wiki, refusinganother host or path, and a mixed tree. CLI tests cover the exit codes, and
that
pullandpushconnect to the tree's wiki. All CLI tests use a localfake server through a
newClientseam, so none reach the network.recorded path, mixed tree, exit code, push and pull ignoring the tree's wiki)
fails its target test.
pull without
--hostwas refused (2). With--hostit pulled. A secondpull, a full refresh and a push preview then worked without
--host. Another--hostwas refused (2). A tree pulled earlier with 0.2.1 previewed a pushwith no
--host.