xetdata / pyxet

Python SDK for XetHub
https://xethub.com/
BSD 3-Clause "New" or "Revised" License
48 stars 8 forks source link

Feature request: pyxet commit history #62

Closed xdssio closed 4 weeks ago

xdssio commented 1 year ago

Rational

Our "timestamps" are commits, therefore we should be able to explore them easily to make it more useful. The function name can be "commit", "commits", or "history". I prefer the word "history" over "commit" since it has less git connotation, it's "feels" more files-oriented (unlike merging of branches which are also commit but of many files) and is very explicit.

Use cases

API suggestion:

$ fs.history("xet://user/repo/branch/file-or-folder" | "local-file-or-folder", limit:int=1, files=False)
[{"hash": ..., "message": ... , "author":..., "date":... , files:[ ]}, ...] # a sorted list from new to old.