I'm using a customized repository index page to display a link to each
repository, along with the project name and description queried
directly from the repository database files.

For 10-20 repositories, the following (skeleton) shell script takes
more than 1 second to finish:

#!/bin/sh
...
listfossil() {
  echo "$(basename "$1")"
  cat <<'SQL' | ./fossil sql --repository "$1"
    SELECT value FROM config
    WHERE name IN ('project-name', 'project-description')
    ORDER BY name DESC LIMIT 2;
SQL
}
find . -name "*.fossil" -type f -print | sort | \
  while IFS= read -r file; do listfossil "$file"; done

Is there any way to speed up this script, i.e. by loading a :memory:
or :temp: database instead of a real repository, attaching to each of
the repositories and reading all the desired values in one single SQL
query?

Another idea in this context might be that the built-in "repolist"
allowed some customization, i.e. to display the project name and
description, possibly even with a customized header/footer
HTML/wiki/markdown file loaded from the repository directory (similar
to the display of the README* files in the "File List" web view).

--Florian
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to