Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fossilpy might benefit from libfossil #1

Open
danshearer opened this issue Feb 20, 2021 · 2 comments
Open

fossilpy might benefit from libfossil #1

danshearer opened this issue Feb 20, 2021 · 2 comments

Comments

@danshearer
Copy link

Hello Gumblex,

You might like to look at calling libfossil from Python to achieve your goals? https://fossil.wanderinghorse.net/r/libfossil/ has scripting bindings, although not yet for Python.

Looking at the comments in fossilpy, I can assure you that there is little value in trying to use SQL directly, although Fossil has an 'sql' command that can be useful. And there are code examples that will enable you to access pretty much any level of detail you like from a Fossil repo.

Dan Shearer

@gumblex
Copy link
Owner

gumblex commented Feb 24, 2021

I knew this library. I think it has not been updated for a long time, while it becomes active now. Since using pure Python to read the repo is simple, why bother to write the cffi/ctypes?

@sgbeal
Copy link

sgbeal commented Feb 25, 2021

It's true that it wasn't updated for about 6 years, as i was out with severe chronic RSI and nobody else picked up the ball. It's now seeing a revival, though, and has been updated to read fossil repos created since its introduction of SHA3 hashes.

If you're only reading from the existing DB schema, instead of accessing the low-level SCM data, using a C library would likely not be worth the effort. If you want to extract file content from the db, though, it cannot be done without fossil/libfossil-level support because the file contents are stored using a combination of zlib and delta compression. Trying to read them directly from the db, without the appropriate decoder algos, will just lead to useless garbage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants