Preserve a mercurial repository in CaltechDATA
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Preserve a mercurial repository in CaltechDATA

Requires python 3 and the python-hglib library You can install python-hglib by typing pip install python-hglib Requires caltechdata_api (

To use:

  • Copy to your repository
  • Tag releases with versions in the form of "major.minor" (New major releases will generate new CaltechDATA records, minor releases will update CaltechDATA records)
  • Get a CaltechDATA access token:
  • Fill out a metadata file. An example metadata.json file is included as a starting point. You can also grab metadata from CaltechDATA using the get_metadata function in caltechdata_api
  • Run the script by typing python metadata.json


This script will make permanent records of your code in CaltechDATA. These cannot be removed. Take care to only run this script when you are ready to preserve your code.