threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

wiki reload: support loading untracked files #149

Open abom opened 5 years ago

abom commented 5 years ago

When doing jsx wiki-reload -n <wiki name>, it doesn't detect untracked files in the local git repository.

I tried repo.untracked_files, but there's another problem regarding paths, as it always construct the docsite from repository root, not from sub-directory.

Every wiki can be loaded from a sub-directory like:

jsx wiki-load -u https://github.com/threefoldtech/jumpscaleX_threebot/tree/development/docs/wikis/examples/docs -n examples -f

The local path will be /sandbox/code/github/threefoldtech/jumpscaleX_threebot/docs/wikis/examples/docs.

But when doing jsx wiki-reload -n examples: It start to create a docsite with the path of /sandbox/code/github/threefoldtech/jumpscaleX_threebot.

which made it hard to find which files related to that docsite are actually changed/added/deleted.

abom commented 5 years ago

I discussed a possible solution with @serboctor to store the base directory of the docsite in meta data, then use it later in wiki-reload.

serboctor commented 5 years ago

I think maybe we need to decide first what exactly are the cases we want to support.

There is also another scenario I've seen, if you edit an existing file, and reload, the changes will reflect since the file has been changed. If you undo the changes, and reload, the changes won't be reverted in the wikis since the git check will state that nothing changed.

waleedhammam commented 5 years ago

todo scenarios:

still checking more possible scenarios