cldf / cldfcatalog

Python library to access reference catalogs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

catalog update fetches but does not checkout

SimonGreenhill opened this issue · comments

I found that running cldfbench catupdate pulls but doesn't checkout, so the catalog remains at the previous commit state (rather than e.g. updating to the new version of concepticon).

I think you also need a call to checkout, but then there's an issue about running into any local uncommtited changes, so not sure what the best policy is.

return [remote.fetch()[0] for remote in self.repo.remotes] # pragma: no cover

This behaviour was intentional. The idea behind the Catalog class is exactly that you can use your standard, working clone of a catalog repository, and only checking out release tags on demand.

So to use a particular release tag, you'd run cldfbench catupdate to make sure all tags are available locally, followed by with Catalog(..., tag='...') to checkout the desired tag temporarily.
Checking out HEAD otoh is something you'd do "by hand".

Does this make sense?

Ok, but I was expecting to update to the latest released. Will keep that in mind.

@SimonGreenhill I'll add a bit of info to the docstring of catupdate.